Delete sensitive info when app is reinstalled
See original GitHub issueI currently use Sensitive Info to save the login tokens etc. I now have a problem where if a user uninstalls the app without logging out, then reinstalls the app on the same phone, the app crashes because it still thinks its logged in.
How can I make sure to delete any relevant information in keychain upon 1st Install? Can this be included in the base library?
I found a workaround on StackOverflow which suggested putting this native code in
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Basically
//Clear keychain on first run in case of reinstallation
if (![[NSUserDefaults standardUserDefaults] objectForKey:@"FirstRun"]) {
// Delete values from keychain here
[[NSUserDefaults standardUserDefaults] setValue:@"1strun" forKey:@"FirstRun"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
I need to insert code in the //Delete values from keychain section, but am not sure how to go about doing this.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:7
Top Results From Across the Web
Do apps really delete all the info they have on you ... - Quora
Yes most of the apps delete all the data kept on your device but some just keep the data for backup purpose. Some...
Read more >The 4 Things You Need to Do Before Deleting an App
The right way to remove an app completely First, delete all your data on the app. While the instructions for erasing data are...
Read more >What data (of or about the app) remains in the device after the ...
When an app is uninstalled, the user will be deleted. Any data left ... Nature of Application Cache: may be and may not...
Read more >Delete an application - ServiceNow Docs
Navigate to System Applications > Applications. Click the name or icon of the application that you want to delete. In the application record, ......
Read more >Control which third-party & internal apps access Google ...
App verification is Google's program to ensure that third-party apps accessing sensitive customer data pass security and privacy checks. Users may be blocked ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can do this without needing to modify native code by implementing AsyncStorage as that stored value will be gone between uninstalls
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.