In the short term, comparing the save URL to URLForUbiquityContainerIdentifier seems to be the best method. You can return NO from -panel:validateURL:error: to prevent saving with a suitable error message.
Thanks, Ben PS, For Graham Cox: Mark Munz is right. I only want to prevent iCloud saving for export formats, not for the documents themselves. On 8 Mar 2013, at 01:32, Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > On Mar 7, 2013, at 14:28 , Ben <ben_cocoa_dev_l...@yahoo.co.uk> wrote: > >> I have an iCloud-enabled document-based app which can export the document >> contents into various other formats. It cannot open these formats. >> >> Is it possible to disable iCloud as a destination in an NSSavePanel for >> these exported files? > > Is there a reason you can't examine the URL returned by -[NSSavePanel URL], > and determine if it is (or is contained in) the URL returned by > -[NSFileManager URLForUbiquityContainerIdentifier:]? > > Or, in a similar vein, use a save panel delegate to prevent such a URL from > being chosen in the first place? > > Alternatively, you might be able to use NSURL's NSURLIsUbiquitousItemKey > property to simplify the check for an iCloud URL, but it's not obvious from > the documentation whether it gives the correct answer for a URL whose file > doesn't exist yet. > _______________________________________________ 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