• 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: Questions regarding the sandbox in iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions regarding the sandbox in iOS


  • Subject: Re: Questions regarding the sandbox in iOS
  • From: Carl Hoefs <email@hidden>
  • Date: Tue, 05 Feb 2019 10:25:00 -0700

The reason for the specific sandbox questions is that my iOS app needs to call
3rd-party functions, some of which create temp files "in place" - as if they
did an fopen("filename.ext","w"). Such temp files appear to be written
"nowhere"...

I was hoping that the sandbox might work along the lines of the "default
working directory" concept in macOS. Can anyone shed light on this?

-Carl

> On Feb 5, 2019, at 7:02 AM, Alex Zavatone <email@hidden> wrote:
>
> The sandbox is within the current app.  The app also has access to other
> shared folders like Music and so on.
>
>   NSString *appLibraryFolder =
> [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask,
> YES) objectAtIndex:0];
>   NSString *appDocumentsFolder =
> [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,
> YES) objectAtIndex:0];
>
>
>> On Feb 4, 2019, at 9:30 PM, Carl Hoefs <email@hidden>
>> wrote:
>>
>> iOS 12
>>
>> Q1. In general, is an iOS app expected to determine the sandbox path to
>> manage its files?
>>
>> Q2. Does the sandbox behave like the "current working directory" default on
>> macOS? (i.e., if a function writes out a file to just "filename" with no
>> path, does it get written automatically to the sandbox?)
>>
>> Q3. What is the proper way to determine the app sandbox path? Is there an
>> app-wide runtime global?
>>
>>   NSString *sandbox =
>> [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES)
>>  lastObject];
>>
>> -Carl
>>
>> _______________________________________________
>>
>> 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
>

_______________________________________________

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

  • Follow-Ups:
    • Re: Questions regarding the sandbox in iOS
      • From: Alex Zavatone <email@hidden>
    • Re: Questions regarding the sandbox in iOS
      • From: Jens Alfke <email@hidden>
References: 
 >Questions regarding the sandbox in iOS (From: Carl Hoefs <email@hidden>)
 >Re: Questions regarding the sandbox in iOS (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Questions regarding the sandbox in iOS
  • Next by Date: Re: Questions regarding the sandbox in iOS
  • Previous by thread: Re: Questions regarding the sandbox in iOS
  • Next by thread: Re: Questions regarding the sandbox in iOS
  • Index(es):
    • Date
    • Thread