Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

PlayerPrefs problem

Discussion in 'iOS and tvOS' started by raskal, Jun 6, 2012.

  1. raskal

    raskal

    Joined:
    Dec 18, 2007
    Posts:
    16
    Hi
    Let's say I want to save a variable:
    bool isPro
    It works fine... BUT:
    After I uninstall app from iPad/iPhone and install it again all Prefs are deleted.

    User have to pay for Pro version so I guess its important to store such info even when user accidentally deletes his app.
    How to do that ?
     
  2. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,723
    If your paid version is an InAppPurchase, depending of the type of purchase, you can retrieve past transaction made by the user.

    I have no idea where I read that 2 days ago... maybe from a comment written into the Prime31's plugin...

    I'll update the thread if I find it. Currently fighting with the inApp purchase as well.
     
  3. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,681
    I don't think it is possible.


    When you delete the app, all stored memory is lost. When you reinstall, you are installing a fresh, new template, identical to the one they originally installed.
     
  4. ezone

    ezone

    Joined:
    Mar 28, 2008
    Posts:
    331
    Use iCloud - Prime31 has a plugin that works great.
     
  5. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,681
    Just going on this, i tested PlayerPrefs on my iPad today, was end of day so not 100% sure but it seemed, despite deleting the app, and reloading the save values were kept. If this is true ir means that the co puter, harddrive of the iPad is storing the values separate from the app.
     
  6. raskal

    raskal

    Joined:
    Dec 18, 2007
    Posts:
    16
    PlayerPrefs are kept when You update app.
    PlayerPrefs are lost when You manually delete app and install again.

    I just hope sama.van is right. Ill be looking for this solution
     
  7. nocanwin

    nocanwin

    Joined:
    May 7, 2009
    Posts:
    176