Storing authentication token on iOS

前端 未结 3 1026
一个人的身影
一个人的身影 2020-12-15 18:17

I am building an iOS application and the user authenticates with my web service. I don\'t want them to login every time the app launches (the token lasts a month). So I\'d l

3条回答
  •  一个人的身影
    2020-12-15 19:04

    You can't rely that iOS will keep your application forever in the memory. So, you have to save the token to persistent storage at some point.

    Look at Keychain Service for iOS. This is the best place to store things like passwords, tokens and other keys.

提交回复
热议问题