NSUserDefaults or keychain is better to save username and password in iPhone app

前端 未结 5 1883
情深已故
情深已故 2020-12-02 01:40

In my iphone app there is some confidential data like username, password and some urls to a webservice. Which one is better NSUserdefaults or keychain. Somebody says NSUser

5条回答
  •  自闭症患者
    2020-12-02 02:27

    It may be useful to notice that Keychain data will be persisted even if you app is deleted, but NSUserDefaults data will go away with the app (NSUserDefaults is part of the app sandbox, Keychain is an app-independent service).

提交回复
热议问题