Unity Codeless IAP, iOS, Sandbox, PurchaseFailureReason.Unknown
We are using Unity Codeless IAP. Android worked immediately without any problems. iOS is not working. We haven't submitted/released that game, but from what I know, we should still be able to test it in sandbox environment.
Unity 5.5.2f1, XCode 8.2.1, iPhone 6s, iOS 10.2.1
Here is what we did/checked:
All our iap products are set up in iTunesConnect (status: Ready to Submit).
We created and tried a few new and old sandbox test accounts (created in "Sandbox Testers" tab in iTunes Connect).
We have accepted all Agreements in iTunes Connect for a long time and other released apps do not have any problems.
We enabled IAP permission in XCode project and verified that provisioning profile also has it enabled.
We successfully uploaded IPA to iTunes Connect (just to check if this build is acceptable by automatic verification when uploading).
We signed-out from any account under Settings -> iTunes & AppStore.
We have NOT signed in to sandbox account ever before running our application in development mode via XCode.
IAP initialize is successful with all our iap products (5 of them total, both consumable and non-consumable). No error there. Prices are applied correctly in our text fields from IAPButton.
When we click on IAPButton we are asked to create or use existing account. We use existing and type correct sandbox account credentials (double-checked or even 100-checked).
We waited day or 2 (if iTunes Connect needs to process something) but still same results.
And here is what we get almost immediately after signing in with sandbox tester account:
IAPButton.OnPurchaseFailed(Product UnityEngine.Purchasing.Product, PurchaseFailureReason Unknown)
Two days of google and experiments and nothing. We are blocked by this single issue and we do not want to release our game before making sure that IAPs are working on both platforms.
Any help?
Answer by colinday · Mar 31, 2017 at 11:02 PM
Sorry, I don't have an answer for this ... but UnityIAP is also failing for me with PurchaseFailureReason.Unknown about 50% of the time.
I'm blaming Apple services ... the status page right this second has "iTunes Sandbox - Issue" lit up in yellow and indicates that there is an ongoing issue and that they are currently investigating it and according to the info on that page it started on 3/29 at 5:20pm ... so it's going on 2 or 3 days now :(
https://developer.apple.com/system-status/
Update: My purchases are now failing 100% of the time for what it's worth.
Answer by okuligowski · Apr 01, 2017 at 06:00 AM
@colinday You are my hero! This was it. Thank you :)
We wasted 3 days, almost cried... Turns out we did everything fine. Good to know.
Answer by nicloay · Nov 27, 2017 at 10:47 AM
If it didn't help. try to submit project so your inapps will change status to "waiting for review" and then cancel submission (it will require to fill out promo materials, icons, descriptions etc, you can use dummy data).