1

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.

Floern
  • 33,559
  • 24
  • 104
  • 119
Evernoob
  • 5,551
  • 8
  • 37
  • 49
  • [http://stackoverflow.com/questions/24033148/deciding-to-use-core-data-or-nsuserdefaults](http://stackoverflow.com/questions/24033148/deciding-to-use-core-data-or-nsuserdefaults) – Gandalf Jun 10 '15 at 09:16

2 Answers2

3

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

Santu C
  • 2,644
  • 2
  • 12
  • 20
  • Thanks mate but the bloke above you said there is a limit... I'm confused now – Evernoob Jun 10 '15 at 09:32
  • just search about NSUserDefaults size limit , you can see lots of people answer on this. you never found any document where apple said that its have limitation. – Santu C Jun 10 '15 at 09:36
2

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.

Danny Bravo
  • 4,534
  • 1
  • 25
  • 43