Si vous ne synchronisez lors de l'arrêt de l'application par exemple:
- (void)applicationWillResignActive:(UIApplication *)application
{
[[NSUserDefaults standardUserDefaults] synchronize];
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
Il va essayer d'écrire dans le fichier fictif d'abord et faire un changement de nom atomique après. Si l'écriture prend trop de temps, vous finirez avec un fichier fictif.
Dans mon cas, j'ai eu quelques utilisateurs avec des plistes 14mb et finissent par avoir beaucoup de fichiers fictifs (prenant presque 2G).
Mon problème et mon problème était de compresser une image que j'avais écrite pour l'utilisateur par défaut.