Save a NSArray to iCloud and retrieve it
问题 I have an app that currently saves a NSMutableArray to a file in the documents directory on the iPad. This is saved by [residentData writeToFile:filePath atomically:NO]; and is read back in by; residentData = [[NSMutableArray alloc] initWithContentsOfFile:filePath]; I need to write this file to iCloud, as the data needs to be available across several devices. I have tried the following to create the file in iCloud; NSData *myFileData = [NSKeyedArchiver archivedDataWithRootObject:residentData]