Is there anyway to set values in the settings.bundle from within the APP

牧云@^-^@ 提交于 2019-11-30 17:33:53

问题


Is there any way to set/update values in the settings.bundle from within your app. I am fine reading in values from the preferences into NSUserDefaults but was wondering whether you can set values from within the app.

I have a web-app which I am making a iPhone client for and was thinking to include the users account details in the settings.bundle. This is fine if the user only updates the values through the Apple Application Preferences screens, but what if the user updated those values in the web app. I wanted to pull down the values from the web and then "update" the values in the settings.bundle from within the App.

I am guessing that this is not possible and that maybe I need to create my own "in-app" settings screen? But thought I would check with you all first ...


回答1:


You're asking two questions here.

The first one is if you can update settings from within the application. You assume you can't, but you can quite easily. Just use NSUserDefault's setObject:forKey: method.

If you want to do in-app settings, I'd start here: How to simplify in app Application Settings management?



来源:https://stackoverflow.com/questions/2528385/is-there-anyway-to-set-values-in-the-settings-bundle-from-within-the-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!