简体   繁体   中英

Cache on iOS, How to delete on relauch

I decided to import this project on my app i found on github lockscreen . Essentially it works just like the iOS pincode lockscreen but in this case it protects the app from being used a random snoopy person. The lockscreen works my issue is if in case I had set a passcode lock pin and delete the app off my iPhone and reinstall it the lockscreen still askes for to enter a pincode. I believe this is being caused form a cache storing the set pin codes for the app. Is the a way to delete the cache at relaunch or in the event of deleting the app ? I suppose this would be implemented in the delegate? How could you do this

Well yes and no. The passkey is stored in the keychain, from which you will need to remove it. The way to do that is to check on startup that it is a new install of the app and clear the current value of the passkey form the keychain.

Since there is not code executed on the removal of you app you can't really do it after or when the app is removed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM