So I have some code that save an array in the appwillterminate section and then in the appdidload it pulls it back in. It works great for editing the one item in the array, however, as soon as you start to add objects to the array it crashes. I read something about needed to save a mutable array as a specific "mutable copy" and then it would allow you to add and delete it. My app really depends on me being able to save the state of my nsmutable arrays and then retrieve it. Im having much dificulty doing so though. Has any one gotten this to work? Heres my code:
- (void)applicationDidFinishLaunching

UIApplication *)application {
projectsArray = [[NSUserDefaults standardUserDefaults] objectForKey:@"projectsArray"];
if (projectsArray == NULL) {
projectsArray = [[NSMutableArray arrayWithObjects:@"New Project", nil] retain];
}
}
- (void)applicationWillTerminate

UIApplication *)application {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject

rojectsArray forKey:@"projectsArray"];
// Save data if appropriate
}
Any help would be sweet thanks!!!