How do I store persistent data on my iOS app using Swift? [closed]

独自空忆成欢 提交于 2019-12-01 09:35:12
Tobi Nary

You have several options for persisting data.

  • NSUserDefaults are meant for user settings - small amounts of data. They seem unsuitable for what you have in mind.
  • NSCoding is quite a good way to store structured data without the overhead of a database, yet it is slow in comparison to core data.

  • Core Data is Apples ORM, which is quite powerfull but not as easy to wrap your head around.

I answered a similar question recently, which goes into more detail regarding NSCoding with a complete example and some links for further reading.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!