• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Disable iCloud as a save destination
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disable iCloud as a save destination


  • Subject: Re: Disable iCloud as a save destination
  • From: Ben <email@hidden>
  • Date: Fri, 08 Mar 2013 18:04:42 +0000

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 <email@hidden> wrote:

> On Mar 7, 2013, at 14:28 , Ben <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden

References: 
 >Disable iCloud as a save destination (From: Ben <email@hidden>)
 >Re: Disable iCloud as a save destination (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Disable iCloud as a save destination
  • Next by Date: NSSpellChecker and proper nouns
  • Previous by thread: Re: Disable iCloud as a save destination
  • Next by thread: NSSpellChecker and proper nouns
  • Index(es):
    • Date
    • Thread