Why doesn't my NSUserDefault value get written?
I'm trying to make use of NSUserDefaults to keep track of some promotional data in my iOS app, but it's not working like I'm expecting it to.  Here's the code...

     NSString *promoID = [[[self currentPromo] allKeys] objectAtIndex:0];
            
     if(![[NSUserDefaults standardUserDefaults] boolForKey:[NSString stringWithFormat:@"promoid-%@", promoID]])
     {
         [[NSUserDefaults standardUserDefaults] setBool:YES forKey:[NSString stringWithFormat:@"promoid-%@", promoID]];
     .
     .
     .

Everytime this if statement is executed, the code inside is executed.  Shouldn't the code inside this if statement only execute once?

Thanks so much for your wisdom!
Why doesn't my NSUserDefault value get written?
===

I'm trying to make use of NSUserDefaults to keep track of some promotional data in my iOS app, but it's not working like I'm expecting it to.  Here's the code...

     NSString *promoID = [[[self currentPromo] allKeys] objectAtIndex:0];
            
     if(![[NSUserDefaults standardUserDefaults] boolForKey:[NSString stringWithFormat:@"promoid-%@", promoID]])
     {
         [[NSUserDefaults standardUserDefaults] setBool:YES forKey:[NSString stringWithFormat:@"promoid-%@", promoID]];
     .
     .
     .

Everytime this if statement is executed, the code inside is executed.  Shouldn't the code inside this if statement only execute once?

Thanks so much for your wisdom!