Thanks a lot for the reply. When it is not using iCloud everything works like a dream. It all functions exactly as expected. I only get the permission error with autosave and iCloud. I have reached a point where if I use writeSafely: etc... it will save to iCloud, but I cannot use autosave, I have to set up a timer to fire every x seconds and save if there are changes.
April. On Jan 30, 2012, at 11:41 PM, Michael Swan wrote: > April, > You should try saving a non-iCloud document and see if you still have issues. > If so try going through a couple of Apple's basic Mac OS X tutorials to see > if they fill in the holes for you. If you are working with Core Data you can > check out some tutorials I've written for a document based Care Data app at > http://www.theMikeSwan.com/blog. I plan to do an iCloud tutorial as soon as I > have the time. I also have some basic classes for iCloud on GitHub that are > in TMSSupportClasses. There is a bug in 10.7.2 where if you have the same > document open on more than one machine and save changes to it on one of the > machines that others will lose the ability to save to the file until you > close it and re-open it on the machine you want to save from. > Also, if you have iCloud problems that are generating log messages (they may > be hiding in Console.app) about your app doing something that isn't allowed > switch to Finder and navigate to ~/Library/Containers and delete the folder > with your app bundle ID. Some times the container gets messed up and needs to > be re-done. > > Good luck, > Mike Swan > ETCP Certified Entertainment Electrician > http://www.theMikeSwan.com > > <pastedGraphic.tiff> > > On 30 Jan, 2012, at 11:15 AM, cocoa-dev-requ...@lists.apple.com wrote: > >> Message: 9 >> Date: Sun, 29 Jan 2012 23:26:41 -0700 >> From: April <developm...@fornextsoft.com> >> To: list-cocoa-dev <cocoa-dev@lists.apple.com> >> Subject: iCloud On OSX - Cannot save changes >> Message-ID: <dd930355-432d-481c-8473-deb6c49e3...@fornextsoft.com> >> Content-Type: text/plain; charset=us-ascii >> >> On iOS iCloud is easy. >> On OSX I don't know what the problem is. >> >> Ok.. First I had a document on my computer. The using the setUbiquidous >> method I moved it to iCloud. >> It is on iCloud, and readable. But thats the problem. I have read only >> access to it from the Mac App. >> >> When I open the document I use : >> >> self.document = [[NTPDocument alloc]initWithContentsOfURL:iCloudURL >> ofType:@"MyDataType" error:&err]; >> >> NTPDocument is my subclass of NSDocument. and only implements the dataOfType >> and readFromData. It also returns YES for autosaves in place. >> >> And that's hitch #1. >> >> When It attempts to autosave I get an error window in the app that it could >> not auto save the document because I do not have permission. >> >> When I try the saveToURL:ofType:forSaveOperation:completionHandler: I get >> an "Unimplemented core routine" error (code -4) I have absolutely no clue >> what this means and cannot for the life of me find the information in the >> documentation on how to open the file for read/write access. I cannot find a >> flag or entitlement anywhere that I am missing for allowing me to write to >> the icloud document... >> >> I have attempted to just use [self.document saveDocument:nil] out of >> desperation but nothing saves, and no error. >> >> The main thing being that no matter what way I try to save, my document is >> never asked to encode the document data. >> >> I'm at a loss... Is there possibly an example of working code? Or some part >> of the documentation that I've not found? I foolishly thought this would be >> a simple matter of porting my iOS code... >> >> If some one has gotten iCloud working for them could you please help? >> >> April. > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com