Possible to save data to phone memory without app installed?

Discussion in 'iOS Programming' started by rynslmns, Apr 23, 2015.

  1. rynslmns macrumors newbie

    Joined:
    Apr 23, 2015
    #1
    Hi, Trying to implement a referral program and was curious if you can save data to a phone (from a webpage) so that whenever the app is installed, it can be retrieved from the app. Ideally, once a referral code is shared, the user would go to a custom url which would save the referral code to the phone. Once the app was downloaded and installed, that referral code would be retrieved. Is this possible? Any advice/suggestions would be appreciated!
     
  2. moonman239 macrumors 68000

    Joined:
    Mar 27, 2009
    #2
    I think if there is a solution, it's to create an SQLite database in the Webpage, then access that database in the app. Unfortunately, I don't know if it's even possible to retrieve that database in the app.
     
  3. AndyK macrumors 65816

    AndyK

    Joined:
    Jan 10, 2008
    #3
    You can't do that.

    This post on Stack Overflow might be useful to help you.
     
  4. DennisBlah macrumors 6502

    DennisBlah

    Joined:
    Dec 5, 2013
    Location:
    The Netherlands
    #4
    You can downliad everything to the documents folder of your app. So you can also download full sqlite databases.
    But what the OP needs is a way to identify the device which runs the app, and so find out if yhe user been on his site for refersl or w.e.

    There is a way to do this.
    Make your site store a cookie.

    For the app, use urlscheme to load your site again and with serverside scripting you can fetch the cookie if exists, double check and use urlscheme in a redirect function, like php's header() function to your app (also urlscheme'd app) with parameters of desired info.

    Your app will load woth parameters, and you have your result.

    Ofcourse its a workaround to access your cookie, but iOS apps can't access the user's safari, unless its jailbroken etc.

    This is your only sollution or you must find a wsy to store sone great unique device number serverside and countercheck it from the app.

    This might be a tough one, and closest you might get is a combination of browseragent,browserverdion,ios version

    But this is not quite reliable. The best but not nicest option would be bouncing apps with utlscheme.

    Good luck!
     
  5. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #5
    Another method would be to have the user save a watermarked image to their photo library from a web page. Then the app can act like a photo editing app and detect whether the appropriate image is present. The app will have to have a valid reason to access photos though, or it won't get approved.
     

Share This Page