storing data locally on the iphone

后端 未结 7 1357
鱼传尺愫
鱼传尺愫 2020-12-02 17:45

I am building an app where I\'d like to store user information locally on the device, without using any server database - but everything on the device side. I am looking to

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 18:01

    You have basically two options to store data:

    1. CoreData (if you are planning to use newer versions of iOS)
    2. SQLite (supports any version of the SDK)

    CoreData uses SQLite, its API is a little bit easier to use (you don't need to know SQL or write a lot of functions to read and write your data).

    SQLite API is still a great choice, since it uses the C API for SQLite, which is very well documented and straightforward to use. It has the benefit that you can target older iOS platforms with this.

    With both options, data will be stored client side, and will be backed every time user syncs his/her phone with iTunes.

提交回复
热议问题