Search Unity

[Solved] Is there an API to NSBundle.appStoreReceiptURL?

Discussion in 'Unity IAP' started by eppz, Feb 25, 2018.

Thread Status:
Not open for further replies.
  1. eppz

    eppz

    Joined:
    Aug 2, 2014
    Posts:
    172
  2. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @eppz ,
    There is no API to retrieve NSBundle.appStoreReceiptURL in UnityIAP, but the receipt has already been included in PurchaseEventArgs.purchasedProduct.receipt.
    You can parse the receipt manually.

    These links might help.
    https://docs.unity3d.com/Manual/UnityIAPPurchaseReceipts.html
    https://forum.unity.com/threads/how-do-i-track-auto-renewing-subscriptions.476293/#post-3108170
    https://docs.unity3d.com/Manual/UnityIAPValidatingReceipts.html

    In addition, you can find the Objective-C source code of UnityIAP at "Assets\Plugins\UnityPurchasing\iOS".
     
    eppz likes this.
  3. eppz

    eppz

    Joined:
    Aug 2, 2014
    Posts:
    172
    Wow, thanks.
    I thought it is closed source.

    I actually need appStoreReceiptURL, in particular, to see if the app is running in a TestFlight Environment or not. I created a tiny plugin anyway to get it.
     
Thread Status:
Not open for further replies.