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

View Single Post
Old 08-24-2010, 04:42 AM   #6 (permalink)
menachi
Registered Member
 
Join Date: Aug 2010
Posts: 1
menachi is on a distinguished road
Default solution

Well after spending more than a day on this issue i found a simple workaround that works perfectly.
I simply check if the appDefaults returns null, if it does i set the default value (in code) and then call the appDefaults synchronize afterwards.
That solves the issue.


if ([appDefaults stringForKey:@"my_key"] == nil){
[appDefaults setObject:@"my default value" forKey:@"my_key"];

}
NSString * val = [appDefaults stringForKey:@"my_key"];
[appDefaults synchronize];

good luck guys...
menachi is offline   Reply With Quote
 

» Advertisements
» Online Users: 369
10 members and 359 guests
Domele, heshiming, iGamesDev, ipodphone, larhondaxzcw, linkmx, Matl43Owa, Renechris, TunaNugget
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,577
Threads: 94,082
Posts: 402,758
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Renechris
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:19 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.