[Solved] Unity 5.6.1 IAPs cannot initialize on IPv6 network

Hey guys,

After couple weeks of endless battle with Unity IAPs and answer from Unity Support, I post my problem here. My app was rejected 9 times from Apple App Store because " We discovered one or more bugs in your app when reviewed on iPad and iPhone running iOS 10.3.2 on Wi-Fi connected to an IPv6 network." I searched a lot and tried the following solutions:

  • Updating IAPs and Unity Editor
  • Turning off and on IAPs
  • Reimporting the IAP package
  • Tried codeless implementation
  • Again initializing in OnInitializationFailed() callback, where I put a counter to stop after the 1000th failed initialize. It actually did fail 1000 times to initialize UnityPurchasing.

Any help will be much appreciated.

Kind regards,
Alex

Hi @alex_netsov

I’m sorry to hear that you are experiencing this issue.

I have found the support ticket that you sent to us and assigned it to myself.

Would you be able to either send me some more information? I’ll then take a look into this further and see if I can find a solution. feel free to post it here, via the support ticket or via a PM? Whatever is best for you.

If you could send me the information listed on this forum post I’ll be able to get started: Welcome to the IAP Forum! Read this before you post. - Unity Services - Unity Discussions

Also, can you please send me the information Apple sent regarding the rejected app? You can find that here: Page Not Found - Apple Developer

Hey Ben,

Thank you for your fast reaction. Here by I attach the Purchaser script where I didn’t have a counter to retry Initializing UnityPurchasing in the OnInitializationFailed() callback.

The script: using System;using System.Collections.Generic;using UnityEngine;using Unit - Pastebin.com
The response from Apple when I tried to submit my game with this script:

Thank you for submitting your app.
Upon further review, we found your app out of compliance with the following guideline(s):

Guideline 2.1 - Performance - App Completeness

We discovered one or more bugs in your app when reviewed on iPad and iPhone running iOS 10.3.2 on Wi-Fi connected to an IPv6 network.

Specifically, the app displays an error when attempting to purchase any of the submitted In-App Purchase items.

Please see attached screenshots for details.

Next Steps

To resolve this issue, please run your app on a device while connected to an IPv6 network (all apps must support IPv6) to identify any issues, then revise and resubmit your app for review.

If we misunderstood the intended behavior of your app, please reply to this message in Resolution Center to provide information on how these features were intended to work.

For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce the issue. For updates, install the new version as an update to the previous version, then follow the steps to reproduce the issue.

Resources

For information about supporting IPv6 Networks, please review Supporting IPv6 DNS64/NAT64 Networks and About Networking.

Best regards,

App Store Review

And here is the screenshot: http://a845.phobos.apple.com/us/r30…3=1497838078_b78f532a2ffa0b693fc9f45ab9c9684d

@alex_netsov
What is the error that is returned in OnInitializeFailed? It will be one of these:
https://docs.unity3d.com/ScriptReference/Purchasing.InitializationFailureReason.html

Hi,

I just got the same rejection notice from Apple. The IAP works fine on my home internet connection, but I do not have an IPV6 network.

I am using the Unity IAP through the “Services” section of the Unity Editor. I do not see anything I can change to my code, so I am thinking this is a problem on Unity’s side.

Is there any update on this?

So? we are still waiting for a solution for this.

@alex_netsov , @ , @kerem-yokuva

If you have an issue with Unity IAP in your app, it is highly unlikely that it is related to IPv6. Unity has supported IPv6 for a while now.

This is from a post from the Apple Developer forums addressing this:
Not All Rejections Are IPv6 Related
The App Review rejection you’ve received indicates that:

  • your app failed

  • it was tested on an IPv6-only network

This does not mean that the failure was specifically caused by that network.

https://forums.developer.apple.com/message/147579#147579

@alex_netsov

The screenshot shows that the tester received an NotInitialized error when trying to make a purchase. This can happen if Initialization hasn’t happened yet or if Initialization failed. If it failed, you can see the reason in the OnInitializeFailed callback. Either way, it might make sense to only show the store if the Purchasing system was initialized successfully.

One other best practice to take into consideration, we strongly recommend you enable the Purchasing system as soon as possible, ideally right when the app starts. This will allow you to make sure Purchasing is enabled when you need to use it and also it should provide a better experience for things like promo codes, etc.