Created
November 20, 2019 13:31
-
-
Save Gerjo/0e31214fbc5aca1ecc974be26d3678fa to your computer and use it in GitHub Desktop.
Remove dodgy MS AppCenter NSUserDefaults keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSUserDefaults* def = [NSUserDefaults standardUserDefaults]; | |
for(NSString* key in @[@"pastDevicesKey", @"SessionIdHistory", @"UserIdHistory"]) | |
{ | |
id obj = [def objectForKey:key]; | |
// These must be NSData. | |
if ([obj isKindOfClass:[NSString class]]) | |
{ | |
NSLog(@"Removed dodgy %@ key from NSUSerDefaults", key); | |
[def removeObjectForKey: key]; | |
[def synchronize]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment