views:

396

answers:

1

I have created a Settings bundle for my iPhone app, with a multivalue specifier called Choice 1.

The titles and values arrays are both correct - titles is strings, and values is 1-5.

I set the default value to be 5, but it always stays as the first title in my array, and also the actual value doesn't appear next to the title of the multivalue option, so i get:

 Choice 1            >

What have i done wrong, that its not accessing the defaults - this happens on both the simulator and device.

Thanks

+2  A: 

Are the types also match? For example, if the default value is an integer but your choices are strings then it will be considered "not match" and ignored.

KennyTM
OK, i had the view set to be iPhone Settings plist, but now i can change the types, but it doesnt make any difference, now both DefaultValue and items in my Values array are set to Number
joec
I deleted my plist in the app_id/library/preferences directory and that seemed to fix it. But each time i change my preferences, i have to delete the plist so something is obviously not right...
joec
You need to ensure there isn't a previous user setting either. It overrides the default value (which is used only when the user setting is empty.)
KennyTM
the same happens on my device too, the default value is used, but i thought, Building and Running created a new Install?
joec
Maybe the new install doesn't erase the old settings. Try manually uninstall the application.
KennyTM
Just did that and it worked! Although i think the type issue would have been a problem too. Thanks
joec