I've searched on google and on here, no luck so far.
To find out whether my application has been launched before, I use code similar to the code in this StackOverflow answer.
The main difference is the negation of the key (FirstLaunch instead of HasLaunched) :
configuration = [NSUserDefaults standardUserDefaults];
[configuration registerDefaults:[[NSDictionary alloc] initWithObjectsAndKeys:@"YES", @"FirstLaunch", nil]];
if ([configuration boolForKey:@"FirstLaunch"]) {
NSLog(@"aha");
// aha
[configuration setBool:NO forKey:@"FirstLaunch"];
[configuration synchronize];
}
This never logs the important @"aha" message, unless I would programmatically set the @"FirstLaunch" key to YES.
Is this a bug or am I overlooking something? I'm merely asking out of curiosity since using the original key in the linked thread works fine.