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
For more detail about user defaults.
2020/10/28 - [개발/ios] - Swift How to save data? Userdefaults
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 :)
'개발 > swift' 카테고리의 다른 글
Implement collectionview pull to refresh (0) | 2021.01.27 |
---|---|
Swift scene delegate vs app delegate (0) | 2020.12.16 |
Swift How to ignore return value? (0) | 2020.12.08 |
Swift drag, drop and reorder collectionView Cell (0) | 2020.12.04 |
Swift try catch error handling (0) | 2020.12.01 |