I am currently testing my app on iOS8. Everything works well on pure iOS8 but I am struggling with the App files migration from iOS7 that will occur for users when iOS8 will be publicly released. As my application uses several "Standard Directories" (Documents, Application Support, ...), I would like to be sure the migration will be smooth.
The application filesystem structure has changed on iOS8 (read iOS beta 4 Release note and the file system programming guide).
When iOS8 will be installed on a device, I guess all previously installed applications and all related files (in Documents, Application Support, ...) will be re-organized to match the new structure.
Do you guys have any clues about the (exhaustive) list of changes that will occur during iOS7 to iOS8 upgrade ? I can't find any documentation on this subject. Is there a way to test/simulate a migration of an iOS7 application sandbox to the new iOS8 sandbox structure ?
Thanks
BONUS question: does the application GUID change when the OS upgrades ?
The file system layout of app containers has changed on disk.
Rather than relying on hard-coded directory structure, use the
NSSearchPathForDirectoriesInDomains
function or theURLForDirectory:inDomain:appropriateForURL:create:error:
method of theNSFileManager
class.
Using the URLForDirectory:inDomain:appropriateForURL:create:error:
method of NSFileManager
:
NSFileManager *yourFileManager = [NSFileManager defaultManager];
NSURL *urlForSomeDirectory = [yourFileManager URLForDirectory:NSDocumentDirectory inDomain:NSAllDomainsMask appropriateForURL:nil create:YES error:nil];
If you are currently using this method, then you don't need to change a thing.
You can replace NSDocumentDirectory
with many other constants. You may also want to substitute a NSError **
for the last parameter if you would like to catch an error.
The bonus question: It shouldn't, however you never know.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With