简体   繁体   中英

Can i use icloud data without coredata?

I'm new in icloud.I'm searching about how to do this in the rigth way. But my questions is Do I have to implement core data to store documents on icluod? how can I do it? Does anyone have a good tutorial about icloud?

I have this code

-(NSString *)archivePathWithName:(NSString*) name {
NSArray *documentDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

NSString *documentDirectory = [documentDirectories objectAtIndex:0];

return [documentDirectory stringByAppendingPathComponent:name];

}

then i save it like that

[NSKeyedArchiver archiveRootObject:items toFile:[self archivePathWithName:name]];

is that being saved at iCloud?

No, you don't have to use Core Data.

  • You can use the key value store of an iCloud OR
  • You can just save your files in your app's iCloud document folder and they'll be synchronized automatically

Core Data iCloud support only gives you incremental updating of a database across devices - which is very nice if you need it... Almost no delays :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM