Re: iOS 7/8 sandboxing question. Path to Documents folder changing on every app launch?
Re: iOS 7/8 sandboxing question. Path to Documents folder changing on every app launch?
- Subject: Re: iOS 7/8 sandboxing question. Path to Documents folder changing on every app launch?
- From: Alex Zavatone <email@hidden>
- Date: Mon, 06 Apr 2015 13:01:22 -0400
On Apr 6, 2015, at 11:45 AM, Mike Abdullah wrote:
>
>> On 6 Apr 2015, at 15:52, Alex Zavatone <email@hidden> wrote:
>>
>> I'm running into an interesting issue I'm trying to track down under iOS 7 and 8. (Xcode 6.2, Mac OS 10.10.2)
>>
>> Our app downloads files and saves them within the app for display later when the user wants to bring them up.
>>
>> It appears that after the first launch, the files can't be found.
>>
>> Does the application path change upon subsequent launches as a result of iOS sandboxing?
>>
>> I'm looking into how we are getting our files' path at the moment and I just wanted to know for sure if I should expect the file path to the application's Documents folder to change under iOS 7/8 under each launch.
>
> I’m pretty sure this is the intended behaviour of the simulator, to show up brittleness in developers’ filesystem code.
Not running in the sim, but only on the device and yeah, the path to the application's Documents directory does change on every launch.
> Sounds like you’re storing absolute paths to the files at the moment? If so, that’s wrong. Apple’s perfectly entitled to place your app’s Documents folder wherever they feel like. You should be storing some sort of _relative_ paths within the folder instead.
Well, the NSFileManager does state that I am finding the file.
I'd like to know the name of the thing that specifies that the file path to the Documents and other folders will be different at any time. Is it part of Sandboxing or some other terminology? If there's no concrete name for it, I'll have to live with "because of Apple security reasons".
Ahh, the joy of learning new code and finding out what broke after refactoring 77 files.
Cheers,
Alex Zavatone
_______________________________________________
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