Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Alex Zavatone
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 = [NSSearchPathForDire

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Carl Hoefs
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 lin

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Jens Alfke
> On Feb 5, 2019, at 9:25 AM, Carl Hoefs wrote: > > 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 > "nowher

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Alex Zavatone
I would start by reading Apple’s standard docs on this. https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html Http://developer.apple.com/app-sandboxing/ There are also ways to share files betwee

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Carl Hoefs
> On Feb 5, 2019, at 10:30 AM, Jens Alfke wrote: > >> On Feb 5, 2019, at 9:25 AM, Carl Hoefs > > wrote: >> >> 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

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Quincey Morris
Actually, I believe this should be: chdir(docsSandbox.fileSystemRepresentation) even though that’s often going to end up being the same C-string in both cases. > On Feb 5, 2019, at 12:29 , Carl Hoefs wrote: > > Yes, chdir(docsSandbox.UTF8String) works perfectly! _

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Saagar Jha
FYI, iOS apps start with their working directory set to “/“ (but don’t depend on this!), so trying to write there is going to fail. NSHomeDirectory is an easy way to get your sandbox root, but you should probably be using the options the others have mentioned. Regards, Saagar Jha > On Feb 4, 2

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Carl Hoefs
> On Feb 5, 2019, at 6:38 PM, Saagar Jha wrote: > > FYI, iOS apps start with their working directory set to “/“ (but don’t depend > on this!), so trying to write there is going to fail. Yes, the writes to / do appear to fail. > NSHomeDirectory is an easy way to get your sandbox root, but you