Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cergman

macrumors 6502a
Original poster
Jan 1, 2013
852
305
my tesla
I'm developing an update to one of my current apps, and I feel the data storage isn't the most efficient. I am currently using plists to store the user's information, but I feel like I should probably move to something more robust. What storage method would you guys recommend for my app? A user can add as many entries as they want, and each entry stores two integers and a string. Thank you!
 
The choices would seem to be sqlite or core data.

How many rows do you think are possible for a user to make? 100, 1000, 10000?
 
Core Data

If you're storing information that requires a database, you should use Core Data. It's not only a powerful abstraction, but it ties directly into many APIs that Apple provides (NSFetchedResultController, iCloud Core Data).

If you're storing things like preferences, user defaults should suffice.
 
It would be highly unlikely for the user to enter more than 10 rows. I've heard core data has a steep learning curve, is that true?

Edit: also this is an iOS app
 
It would be highly unlikely for the user to enter more than 10 rows. I've heard core data has a steep learning curve, is that true?

Core Data does have a steep learning curve, but I'm sure it would be worth learning. It has lots of goodies built-in.

On the other hand, interacting directly with SQLite might have a steep learning curve too. That's the approach I'm using in my current project, but then I have no problem writing SQL statements.

plists are probably the easiest way to read and write data, but they don't scale. Whenever you want to change one value in a plist, the whole list gets re-written.
 
Realm.io is a new option.

Only just started looking at it for a project but does look promising.
It's certainly a lot more direct in terms of code than Core Data, as the data model is defined in classes.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.