I am newbie to iPhone development. I have a Root.plist under Settings.bundl like below image. While doing Adhoc testing with users. we used Item 0, Item 1开发者_StackOverflow中文版, Item 2 for testing. because there is web service url in item1. Now we are planning to move this app to app store. So we dont need show this information settings to user. How can I hide these items to user? but we still need this info for app usage.
I recommend NSUserDefaults. When you set something in NSUserDefaults, it stays there until changed (between loads as well).
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
That creates an instance of NSUserDefaults and to add an object it's essentially a dictionary...
[prefs setObject:@"NO" forKey:@"didCrash"];
Good luck!
You need to store your URL elsewhere in your app, not in a Settings bundle. You could hard-code the string as a variable, use NSUserDefaults, or a database.
精彩评论