Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kingsapo

macrumors member
Original poster
Jun 10, 2010
58
4
Hey all! So I'm trying to get my app integrated with iCloud, and I've run into some issues with deleting documents. I've already done all the setup stuff - made a UIDocument subclass, did an NSMetadataQuery to see if there's anything in the iCloud directory, had a method call when the query finished. The first time around it works great - it sees that there is nothing in the iCloud directory and fills it with an empty version of my UIDocument subclass.

The problem comes in when I try to delete the document I just created. Not from within the app, but from the Settings app, when you go to Settings - iCloud - Storage & Backup - Manage Storage - (my app here). I see the document I made, and am able to delete it. When I restart my app, I would expect it to see that there is nothing there, and to create a new empty version of my UIDocument subclass. Instead it reports that there is an item there, and 5-10 seconds later, spits out this error message:

2013-01-11 00:51:40.543 Binary Warrior[5746:1117] Foundation called mkdir("/var/mobile/Library/Mobile Documents/.ubd/peer-7C2909B0-0E74-D6BB-9A01-52599FCFFE72-v23/ftr/(A Document Being Saved By Binary Warrior)"), it didn't return 0, and errno was set to 1.

I believe the problem is related to iOS 6. I have tried this on multiple devices - 2 devices running iOS 5.1.1, 1 device running iOS 6.0.1 and 1 running 6.0.2. The devices running iOS 5 handle this perfectly - create a new version, delete from settings, go back and it makes another one. On the iOS 6 devices, create a new version, delete from settings, go back and get the above error. Interestingly, one device, an iPad 3 running 6.0.1 is able to re-create the document after re-launching after showing the above error. Then there is an iPhone 5 running 6.0.2 that can't really do anything - it always reports there being a document on iCloud even when there isn't one.

In conclusion, I'm obviously pretty lost on how to handle this, so anyone with any iCloud experience, I could really use your help. If you need any other info, don't be afraid to ask. Any help is appreciated. Thanks! :D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.