Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-07-2012, 01:45 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 38
iOS.Lover is on a distinguished road
Default Setting bundle default value bug

I have an iPhone application with a settings.bundle that handles various settings for my application with Switch toggle . I set default values in my root.plist file (using the DefaultValue property) to YES but any time the application lunches on device or iOS simulator all values go NO !!! just for the first lunch worked well ! I am sure it's not because of my code :

Code:
NSUserDefaults *localeDefaults = [NSUserDefaults standardUserDefaults];
    BOOL ENWORDS = [localeDefaults boolForKey:@"localetime"];
    if (ENWORDS) { 
// do someghing  }
    if (!ENWORDS) { //do something else }

iOS.Lover is online now   Reply With Quote
Old 02-07-2012, 02:31 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

Your default value is of type "string", and you're trying to retrieve it using boolForKey. @"YES" is not equal to YES

Isn't there an option to change the Default Value type to bool??
smithdale87 is offline   Reply With Quote
Old 02-07-2012, 02:50 PM   #3 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 38
iOS.Lover is on a distinguished road
Default

Quote:
Originally Posted by smithdale87 View Post
Your default value is of type "string", and you're trying to retrieve it using boolForKey. @"YES" is not equal to YES

Isn't there an option to change the Default Value type to bool??
yes you'r right
iOS.Lover is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 399
13 members and 386 guests
7twenty7, chiataytuday, cristofercolmbos, fiftysixty, gmarro, iOS.Lover, KennyChong, kilobytedump, Matrix23, raymng, ryantcb, stanny, xerohuang
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,669
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, dedeys78
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:19 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0