We recently replaced a pre-existing app with a Unity version. We have submitted 3 builds recently to Apple app review which when released none of the IAP features were working for our users. We were able to recreate the issue ourselves. The problem is all the builds worked when we were doing pre-release testing with sandbox accounts so we’re not sure what’s going on.
We’re using version 1.15.0 of the Unity IAP plugin. Publishing with Unity 2017.2
Please provide additional details so that we may troubleshoot, including your steps to recreate the issue. Device logs would help, filter for the string unity.
You mentioned that you are able to reproduce the issue, please provide those steps so that we can attempt to troubleshoot, and describe the behavior that you are seeing. Also please provide your purchase script
I can’t find any usable logs since the issue only occurs in the released build with real Apple IDs. If you have advice on which log you’re looking for specifically I can look for it.
In Sandbox testing everything works correctly. Apple has told us twice now that everything is configured properly with the app owner accounts banking information and IAP item setup.
Download Long Story from the app store
Sign in to your device with a real apple ID, NOT a sandbox testing account
Try to make any purchase in the app.
Actual Result: Nothing happens
Expected Result: Apple purchase dialog triggers and displays
Sandbox testing result: Apple purchase dialog triggers and displays
Unfortunately we are just a pass through service for the various stores. If it is working in the Sandbox environment and not in a release build, then it is likely a configuration issue on the Apple side. Yes, it can be difficult to get the Apple logs when the app is released. You might consider adding a debug mode to the released app and add UI output. Specifically we would want to see the result of IAP Initialize which is likely failing. Also, you might want to check if
UNITY_PURCHASING is properly defined on this page.
The configuration on the Apple side of things was all pre-existing and working correctly in the old version of the app before we replaced it with the Unity version.
I have verified multiple times that UNITY_PURCHASING is properly defined in the code base.
I will look into adding more debugging to the release build.
The issue ended up being an edge case bug with the Unity IAP plugin.
In our case we had 8 total items but 1 was disabled so when we requested all the product details we only got back details for 7 items which left the plugin in a waiting state and subsequently OnInitialized was not called in our app.
Solution 1: Don’t request disabled items.
Solution 2: Re-enable the disabled item but hide it in app another way.
Long term solution: Unity IAP plugin will be updated to address this scenario.
Thanks to Unity Support for working through this issue with me.