Code:
// Default settings
NSString *var1 = [NSString stringWithString:@"YES"];
NSString *var2 = [NSString stringWithString:@"40.0"];
NSString *var3 = [NSString stringWithString:@"YES"];
NSString *var4 = [NSString stringWithString:@"40.0"];
NSString *var5 = [NSString stringWithString:@"NO"];
NSString *var6 = [NSString stringWithString:@"5.0"];
// Register initial default settings
NSDictionary *appDefaults = [[NSDictionary alloc] initWithObjectsAndKeys:var1, @"Var1", var2, @"Var2", var3, @"Var3", var4, @"Var4", var5, @"Var5", var6, @"Var6"];
Ignore the naming, it's just to protect my code. Basically I'm using YES and NO for BOOL vars, because when you fetch it as a BOOL, it can use a string and use YES or NO to determine the value of the BOOL. The other ones are floats, same thing...it can pull a float from a string.
This works fine in the sim, I can register this array and write to it...everything works as expected. In my iPhone, it crashes...and it has nothing to do with the UserDefaults stuff...it's that dictionary...if I try to create it on the iPhone...it crashes.