개발/swift

Swift How to init keychain when app deleted?

lemonade 2020. 12. 12. 10:00
반응형

How to init keychain when app deleted?

 

Keychain is safe & encrypted way to save small storage data.  But data in user defaults is in no way stored securely as hackers can access it pretty easily from the device.

Apple has provided the Keychain Services API to deal with this problem. Developers can safely handle passwords and other sensitive information using key chain service api. But unlike user defaults, data in keychain still exists when app removed. 

Apple official docs about keychain service.

 

developer.apple.com/documentation/security/keychain_services

 

Apple Developer Documentation

 

developer.apple.com


For more detail about user defaults.

 

2020/10/28 - [개발/ios] - Swift How to save data? Userdefaults

 

Swift How to save data? Userdefaults

How to save data in ios? You can use UserDefaults to store any basic data type such as Bool, Float, Double, Int, String, or URL, but you can also write more complex types s..

lemon-high.tistory.com

 

 

When using keychain, you should check keychain when app opened.

 


Keychain data should not be removed depending on usecase like auto login.  It’s up to you.

Noted) Access to the keychain is dependant on the provisioning profile that is used to sign the application. 

Therefore no other applications would be able to access this information in the keychain.

Happy coding :)

 

반응형
그리드형