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!
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
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?
 

Mascots

macrumors 68000
Sep 5, 2009
1,665
1,415
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.
 

Cergman

macrumors 6502a
Original poster
Jan 1, 2013
852
305
my tesla
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
 

TheWatchfulOne

macrumors 6502a
Jun 19, 2009
832
958
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.
 

MattInOz

macrumors 68030
Jan 19, 2006
2,760
0
Sydney
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.