arnoapp
arnoapp

Reputation: 2506

Performance&Syncing: Storing in CoreData or as Array saved in File

I currently have an App which stores it's data by converting an NSArray to NSData and writes it in a file like this:

NSData *theData = [NSKeyedArchiver archivedDataWithRootObject:theSaveArray];
        [theData writeToFile:[self filePath:@"/Time.dat"] atomically:YES];

A typical user saves data on a daily base which means that the array will become very large after a short time.

I'm thinking of updating the app and migrate the data to CoreData with sqllite, but I'm not sure if it will improve something(By now I can't see problems but I'm a bit worried what happens in the future).

The Array fills a TableView. But what happens after several years when the array has 1000+ entries? And what about iCloud Sync? I know that CoreData could be synced easily what about a local file?

Upvotes: 0

Views: 60

Answers (1)

Mundi
Mundi

Reputation: 80265

Yes, definitely, Core Data is the way to go. From a coding standpoint, the problem seems trivial. The problems you anticipate will indeed materialize if you do not switch to a more robust storage solution.

Upvotes: 1

Related Questions