what happens in iOS when nscoding writeToFile is saving and user closes the app?
NSData *d = [NSKeyedArchiver archivedDataWithRootObject:self];
[d writeToFile:FILE_PATH atomically:YES];
For example suppose there is 100 MB of user data to save - it will probably take a while (NSData writeToFile is really slow) - so if the user closes the app, will the write process just not finish and you wouldn't have your data synced?
If so, is there a way to prevent the user from closing the app until you are done saving?