• 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: Modifying the save path in an NSDocument based application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modifying the save path in an NSDocument based application


  • Subject: Re: Modifying the save path in an NSDocument based application
  • From: Pax <email@hidden>
  • Date: Thu, 19 Sep 2013 16:22:24 +0100

The answer, if anyone else is thinking of answering this question, is to use NSFileWrapper - ensuring that "Document is distributed as a bundle" is unchecked for the folder that you generate.

Simples.  And my apologies to all here for not investigating further before posting a question.

On 18 Sep 2013, at 20:54, Pax <email@hidden> wrote:

> Okay, the plot thickens.  I've now updated my app for the app store - sandboxing is now enabled.  Sandboxing breaks the  save path modification, and particularly my creation of a folder:
>
>             if(![fileManager createDirectoryAtPath:directory
>                        withIntermediateDirectories:NO
>                                         attributes:nil
>                                              error:&error])
>             {
>                 NSLog(@"Failed to create directory \"%@\". Error: %@ - this save will most likely fail entirely.", directory, error);
>             }
>             else
>             { ... }
>
> With sandboxing enabled, the creation of the directory always fails - unless the user opts to save in the Downloads directory.  Most odd.
>
> The user can choose to save an undecoded version of the file wherever they like.  I have set read/write access for the Downloads Folder - which probably explains this.  How can I get read/write access to wherever the user chooses to extract the files (most likely Documents, loose in their home folder, or the desktop?)

_______________________________________________

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: 
 >Modifying the save path in an NSDocument based application (From: Pax <email@hidden>)
 >Re: Modifying the save path in an NSDocument based application (From: Steve Mills <email@hidden>)
 >Re: Modifying the save path in an NSDocument based application (From: Jerry Krinock <email@hidden>)
 >Re: Modifying the save path in an NSDocument based application (From: Pax <email@hidden>)

  • Prev by Date: Re: iOS Calendar Question
  • Next by Date: Re: iOS Calendar Question
  • Previous by thread: Re: Modifying the save path in an NSDocument based application
  • Next by thread: Re: Modifying the save path in an NSDocument based application
  • Index(es):
    • Date
    • Thread