开发者

hide items in xcode app?

开发者 https://www.devze.com 2023-03-28 16:16 出处:网络
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

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.

hide items in xcode app?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消