For storing a growing collection of data records, is NSUserDefaults or CoreData better?

96 views Asked by At

As per the question title, each user of my app is going to gradually add more and more records of data so that the data can be analyzed later on.

IS NSUserDefaults an appropriate candidate for this or should I use CoreData? The records are not complicated at all, but they could grow to a sizeable number per user.

2

There are 2 answers

2
Santu C On BEST ANSWER

As long as there have space in your device you can store data using NSUserDefaults, internally its store date into plist file. If you are not storing very complex data structure then you may go with NSUserDefaults, no matter how its size is. There have no size limit with NSUserDefaults.

NSUserDefaults storage size

0
Danny Bravo On

NSUserDefaults has a no limitations on the number of entries you can make. plist should only be used to store small amounts of data and, ideally, not binary data (NSData) objects. It sounds like your requirements lean towards using CoreData if you want the best performance.