Saving Setting Option (Local or Database)

Discussion in 'iOS Programming' started by oo7ml, Mar 12, 2015.

  1. oo7ml macrumors 6502

    Joined:
    Jan 20, 2010
    #1
    Hi,

    I am adding various intro pop up screens / messages to my app that explain various parts of the app... such as:


    ==============================

    WELCOME

    This section allows you to... etc.

    [ ] don't show this again

    ==============================


    User's can click the 'don't show this again' option and the setting will be saved,so that they don't see the message again, however i am trying to decide where to save this setting.

    Which do you think is a better method?

    A - save the setting to locally within the app (quicker access, but would future updates cause problems)

    B - save the setting to the user's profile in the database (slower, but would not effect future updates)


    Any advice on this would be greatly appreciated, thank you.
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    This would be my choice, and I would use NSUserDefaults to do it. Future updates should not cause problems with that approach.
     
  3. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #3
    The implication in your description is that "the database" isn't local, but that's never actually stated. For all anyone knows, the database could be local, which means the question boils down to which of two local locations the setting should be stored in.

    So assuming the database is remote, ask yourself what your app should do if it doesn't have a connection to the remote database. Should it do nothing at all (fail)? Store the setting locally until it can sync to a remote database?
     

Share This Page