简体   繁体   中英

Best way to remotely update app settings in iOS

I am working on a application in which i have to update all app related settings remotely.

App setings include

  1. Text Font
  2. List item
  3. Text Color
  4. background Color
  5. Images
  6. Url etc..

My idea is something like this, the first time when the user install the app it start downloading all images and settings like text color, font etc. And when ever any changes happen the app itself downlaod those changes and store it locally.

Currently i am using a constant file where i have written all required settings.

Tell me some best way to achieve this and also tell me where to save the settings.

If is there any sample app available please provide me the link.

Thanks.

You could try something like GroundControl . It updates values in NSUserDefaults from a file found on a web server.

If you have a constant file from which you read all your settings, you can place an identically formatted file on a server, (maybe have a "last updated" date saved inside these files). Upon every session init, try to download the remote settings file - if it is "later" than the one you have, or any settings is different than the one you have saved, save the newly downloaded file instead of the old one, and act upon the changes.

The settings' flags and vars may change instantly across the app, while downloading images for skin and UI occurs immidiately after this, and take effect after they have completed downloading (which may look awkward to the user) or, more plausibly, upon init of the next session.

IMHO, using NSUSerDefaults settings and downloading a remote plist with the same keys and structure is most convenient file format for settings stuff.

Also, you may place the remote file in a web service, and have the client send that web service the request for the file accompanied with a "my last updated settings are of the date X" - the date of the latest settings you have locally. Then, the server may return a file, or an "you already have the latest file" response.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM