In Xcode 6: NSUserDefaults
does not work in devices simulators (iPhone 5, iPhone 6, etc, simulators).
If you test on real devices, it works perfect. Someone know how to send this information to Apple? I have tried to contact Apple, but I have not received answer.
I can not test on a real iPhone6 or iPhone6 Plus because in my country is not yet available.
My code (is an example) that works perfect on devices:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *appTheme = [defaults objectForKey:@"theme_preference"];
if ([appTheme isEqualToString:@"color0"]) {
} else {
}
Probably, I did not expressed myself clearly.
The user, in "iPhone o iPad Settings" must change the settings parameters of the application.
The settings are implemented by the "Root.plist" of the "Settings.bundle".
That is, I try to test the user changes the parameters of the application. But in the source code I do not see these changes. I talk always of devices simulators (Xcode6)
Today I finally have fixed the problem. I have installed the latest update of Xcode (Version 6.1) and then I have reset the simulator.
Then I have accessed to my settings App. Until you open the settings of your application, settings are not copied in simulator (or real device)
It is imperative access at least once to your App settings.
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