Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

InApp auto restore

Discussion in 'Unity IAP' started by developHTS, Jun 20, 2018.

  1. developHTS

    developHTS

    Joined:
    Nov 3, 2017
    Posts:
    2
    A problem appeared while testing an app using a test account.
    The app was deleted after an InApp purchase had been made, then was re-installed and the purchase was restored. After these manipulations, further deletions and re-installations make the purchase restore on its own will, without using the restore function, no matter what test account is used.

    How can this problem be solved?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    1,772
    Is this on Google or iOS? On Google, purchases will automatically be restored.
     
  3. developHTS

    developHTS

    Joined:
    Nov 3, 2017
    Posts:
    2
    Platform IOS
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    1,772
  5. vabster

    vabster

    Joined:
    May 12, 2013
    Posts:
    13
    I can't post steps to reproduce or device logs, just wanted to let you know this is happening to me too on an iOS device in Unity 2018.1.5f1
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    1,772
    @vabster Any reason you are not able to provide device logs or steps to reproduce? Perhaps it is because it was reported by a user, and you're not seeing it yourself? We have not seen this behavior here, the logs would be necessary to troubleshoot, thanks.
     
  7. oskar-szulc

    oskar-szulc

    Joined:
    Feb 22, 2013
    Posts:
    2
    @JeffDUnity3D
    The same problem appears in 2017.4.3f1
    Here are log excerpts that might be useful:
    UnityIAP Version: 1.18.0
    UnityEngine.Purchasing.StandardPurchasingModule:Instance(AppStore)
    PurchaseHandler:InitializePurchasing()

    /var/mobile/Containers/Data/Application/283CEC00-98EB-4C64-951B-857FFED8466E/Documents/Unity/0f11d761-1a2e-4742-a98c-f061d7bd6925/IAP/store.json
    UnityEngine.Purchasing.PurchasingManager:Initialize(IInternalStoreListener, HashSet`1)
    PurchaseHandler:InitializePurchasing()

    Log: Fetching optimized store details from https://ecommerce.iap.unity3d.com/catalog?appid=[removed]&deviceid=[removed]&userid=[removed]
    UnityEngine.Purchasing.StoreCatalogImpl:FetchProducts(Action`1)
    PurchaseHandler:InitializePurchasing()

    Log: Failed to fetch IAP catalog due to unexpected http status code, attempting to use cache


    and then comes the list of restore purchase calls in form of


    PurchaseHandler:ProcessPurchase(PurchaseEventArgs)
    UnityEngine.Purchasing.Extension.UnityUtil:Update()
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    1,772
    @oskar-szulc Those calls are expected in the normal initialization flow (the http status code mention is an incorrect error and can be safely ignored). Please provide steps to reproduce.
     
  9. msureka83

    msureka83

    Joined:
    Nov 28, 2014
    Posts:
    19
    Same here. After the last update of Unity IAP, is is automatically restoring purchases. I thought this was a feature of the new IAP update to make it function like android. Is this a bug and not suppose to happen??
     
  10. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    1,772
    @msureka83 please provide steps to reproduce.