Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.15 KB

Store_Data.md

File metadata and controls

32 lines (21 loc) · 1.15 KB

Data storage

UserDefaults

NSUserDefaults as the name suggests (vaguely) should be used for storing preferences and app settings only. You should not be storing critical data and or user data into them

  • Easy to store and retrieve data.
  • Useful for storing default values with minimum fuzz.
  • Not suitable for large data sets
  • Performance hit when you try to store and load large amount of data All or nothing approach

CoreData

CoreData is a full fledged persistent framework which supports large data transaction

  • Reliable framework to interact and query against data
  • Can be extremely fast when setup correctly (with relationships)
  • Powerful capabilities

NSKeyedArchiver

SQLite

Realm

Reference