I'm using NSUserDefaults and I have the code mondayalarm = [prefs stringForKey:@"mondayalarm"]; and mondayalarm (first reference, not the key) is an NSDate. It's giving me the warning:
incompatible Objective-C types assigning 'struct NSString *', expected 'struct NSDate *'
How can i make it accept this without the warning?
To prevent the warning:
mondayalarm = (NSDate*)[prefs stringForKey:@"mondayalarm"];
To fix your problem:
mondayalarm = [prefs objectForKey:@"mondayalarm"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With