Settings bundle and default values issue

The issue occurs when you want to get the default value for some key prior to that value being set in device settings. This is why you want the default value in the first place. To work around this, you need to load the Root.plist from the Settings.bundle and get the default values from the dictionary.

As Carlton suggested in his comment, you could use registerDefaults: method. You may call this in application:didFinishLaunchingWithOptions: method.

Related Post

Remember to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someone

2 thoughts on “Settings bundle and default values issue

    1. You most certainly could 😉 I have updated my post with this method. Thanks for your comment.

Leave a Reply

Your email address will not be published. Required fields are marked *