storing data locally on the iphone

后端 未结 7 1369
鱼传尺愫
鱼传尺愫 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:07

    if you just storing a few values and don't need any search logic, you could take a look into NSUserDefaults

    [NSUserDefaults standardUserDefaults] 
    

    its just an dictionary where you can store arrays, strings, int, objects and access by a NSString key

    internally it's a just plist, so you can open it with xcode to quicky see the current state

提交回复
热议问题