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

Bug Unity IAP works in iOS Sandbox but not in store build

Discussion in 'Unity IAP' started by chiragchopra, Aug 30, 2023.

  1. chiragchopra

    chiragchopra

    Joined:
    Sep 23, 2013
    Posts:
    4
    We are using codeless Unity IAP with a single IAP to remove ads and unlock the full game. We are on Unity IAP v4.5.1 and using Easy Mobile Pro for the same. The problem is strange - the IAP works on Android perfectly but not on iOS. On iOS, sandbox purchase works as intended, but the store build doesn't process the IAP even after the user sees the native "Purchase successful" popup. The money gets deducted from the user's account, and still, it doesn't work. Restoring doesn't work either. The IAP product is approved on the App Store without any problems.
    Can someone point me in the right direction? At first, we thought it had something to do with receipt validation, but turning it off doesn't solve the issue either.
     
  2. GrumpyRhino

    GrumpyRhino

    Joined:
    Jun 5, 2013
    Posts:
    22
    We have the same issue. Not using codeless.

    Unity version 2020.3.48f1. In-app purchasing 4.8.0.

    Purchases work fine on Android. Do not work on the latest live version of the app on iOS. They do work on TestFlight/building from Xcode. We haven't touched in-app purchase code or updated Unity/Xcode since the last update.
     
  3. GrumpyRhino

    GrumpyRhino

    Joined:
    Jun 5, 2013
    Posts:
    22
    Seems to be affecting some other apps that have updated recently, I'm aware of one massive game that appears to have had this same issue after updating in the last 24 hours. I don't know for sure if this game was developed in Unity or uses Unity IAP package, it's possible it's an iOS systems issue.
     
    Last edited: Aug 31, 2023
  4. unity_PR2J0QhL1H_Hhg

    unity_PR2J0QhL1H_Hhg

    Joined:
    Jan 7, 2019
    Posts:
    1
    We have the same issue, sandbox purchases working fine, appstore purchases failing.
    We think it's because we're using local validation and an older version of Unity IAP. Any app uploaded after the 14th of August will use new receipt encrypting and older versions of UnityIAP (older than 4.9.4) won't be able to handle them.
    https://developer.apple.com/news/?id=smofnyhj

    See this thread: https://forum.unity.com/threads/imp...alidation-for-sha-256-apple-receipts.1479150/
    UnityIAP 4.9.4 fixes local validation (search your codebase for usages of
    AppleValidator
    or
    CrossPlatformValidator
    ).
     
    kyubuns likes this.
  5. GrumpyRhino

    GrumpyRhino

    Joined:
    Jun 5, 2013
    Posts:
    22
    You, are a star.

    Updating to 4.9.4 worked for us!