Re: Requesting assistance with sandboxing please.
Re: Requesting assistance with sandboxing please.
- Subject: Re: Requesting assistance with sandboxing please.
- From: Robert DuToit <email@hidden>
- Date: Fri, 29 Aug 2014 16:59:38 -0400
What I understand is that using the NSDocumentDirectory methods should give you the correct path in or out of sandbox.
Rob
On Aug 29, 2014, at 10:07 AM, Brian Christmas <email@hidden> wrote:
> Thanks for that Robert.
>
> However, for my particular requirements, it's essential that I write outside of the sandbox.
>
> My app is designed to be a 'learner in ASObjC's guide', and allows the user to build a copy of the project App outside of the App Store version, using the same code. Therefore, their version will not have a sandbox restriction, and will read/write to the Documents folder. Unless there's some way of telling if an App is sandboxed or not, i have to write to the Documents folder too.
>
> According to everything I've read, my approach is supposed to work. Don't know why.
>
> Regards
>
> Santa
>
> .
>
>
> On 29/08/2014, at 11:55 PM, Robert DuToit <email@hidden> wrote:
>
> You can write to the Documents folder that is within your apps container directory without any special entitlement. You have full access to any folders within your sandboxed app’s container. You only need special “cases” for directories outside your app’s scope. To write outside the container you need to go through the open or save panel which allows user to make the choice themselves.
>
> The actual path is Home/Library/Containers/yourAppContainer/Data/Documents
>
> I believe that this (in oBJc) gets the standard Documents folder in any environment, including the sandbox:
>
> NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
> NSString *path = [paths objectAtIndex:0];
>
> Rob
> On Aug 29, 2014, at 8:54 AM, Brian Christmas <email@hidden> wrote:
>
>> G'day scripters.
>>
>> I'm trying to get an App ready for the Mac App Store, and I'm having trouble with trying to read-write a small file to the 'Documents' folder.
>>
>> I've set up an entitlements file, and entered an Array with what I hope is the correct path to the file. Am I on the right track with the procedure so far? It certainly doesn't work!
>>
>> My code works fine without the entitlements file.
>>
>> Regards
>>
>> Santa
>>
>> <Screen Shot 2014-08-29 at 10.43.03 PM.png>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> applescriptobjc-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden