Resolved updating the content database on an app?

Discussion in 'iOS Programming' started by MrFusion, Feb 5, 2015.

  1. MrFusion, Feb 5, 2015
    Last edited: Feb 5, 2015

    MrFusion macrumors 6502a

    Joined:
    Jun 8, 2005
    Location:
    West-Europe
    #1
    Suppose I have an app which is working flawlessly and never needs an update (yeah right :rolleyes: ), but the data it shows to the user needs periodic updates. When an update occurs is unpredictable but fairly regularly. Once a week, sometimes more, sometimes less.

    Since I use coredata, I only have to replace or update the database file and everything is good to go.

    I am not sure where to begin and what the recommended practices are. A push along the right track is probably all I need at this point.


    1. What is the best way to do this and how do you ensure data integrity/security? It has to show my data, not from a middle person.
    2. Is there a way to do this via the app store updates (without the user having to update the app manually)? Or do I need a server of my own?
    3. Can I use the push notification from apple (never used this before) or does my app need to poll my server?
     
  2. Sean7512 macrumors 6502a

    Joined:
    Jun 8, 2005
    #2
    You have 2 options:

    1. Release an app update (easiest but probably the worst path forward -- doing this once a week, yuck!)
    2. Use a server to push these out. You can make use of Silent Push Notifications which will awake your app and allow you to pull down the latest data. If you don't want to setup push notifications, then having your app check daily for updates would also work.

    As for security, ensure you are using SSL on your web server and if you're dealing with usernames/passwords ensure that you are using a good salting algorithm and hashing them correctly.
     
  3. MrFusion thread starter macrumors 6502a

    Joined:
    Jun 8, 2005
    Location:
    West-Europe
    #3
    Yeah, option 1 is really unappealing if it has to go through the entire process of validation only to update a single data entry.

    It's the same public data for everyone. So I put an updated file on my server, send a push notification and just download it from the server. It just seems to easy (conceptually)?

    Can I put the url in the push notification (security wise?) or should I hardcode the location in the app? Can everyone send a notification or only the developer?

    Thanks for the advice!
     
  4. Sean7512 macrumors 6502a

    Joined:
    Jun 8, 2005
    #4
    It is that easy. To send the notification, you need your private ssl certificate that you will setup in the Dev Portal so as long as you don't give that to anyone, then only you can send it.

    Sure, put the update url in the push data. That would be more flexible incase in the future the URL changes, then you won't need a new app.
     
  5. MrFusion thread starter macrumors 6502a

    Joined:
    Jun 8, 2005
    Location:
    West-Europe
    #5
    Thanks!
     

Share This Page