Can't reproduce (IPv6?) connection issue that

2020-06-30 16:16发布

问题:

I am experiencing an IPv6 problems with my iOS apps. Initially I submitted a few days before June 1st not knowing about IPv6 requirement (https://developer.apple.com/news/?id=05042016a).

They were reviewed on June 1st and rejected for IPv6 incompatibility/not being able to connect. I didn’t want to set up my own IPv6 network, so I updated the code to be compliant - I updated Reachability provided by Apple to the newest version. I am also using my own downloading library written by a former cofounder several years ago. It doesn’t connect to IP addresses, or anything Apple recommends against, so I didn't decide to upgrade it right now. I am also using an old version of AFNetworking.

I resubmitted an app. Was rejected again for same reason. I went and bought thunderbolt adapter and setup IPv6. Now I connect fine to that app. I can also connect fine to another app which still has very old Reachability code. My main problem is I want it to break in the same way that Apple is breaking, so I can fix it properly.

Notes:

-I initially tried to post a comment on IPv6 App Store Rejection but it was too long. I am @andytriboletti on Twitter, linked to by Sean in that question.

-I posted this on Apple Developer Forums, but it's still waiting for approval 10 hours later: https://forums.developer.apple.com/message/141461#141461

-Here's how I set up my IPv6 network using thunderbolt ethernet adapter on my Macbook pro. https://developer.apple.com/library/tvos/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html

-I am testing with an iPhone 6 running OS 9.3.2. My Macbook Pro that is running the IPv6 network setup as described in Apple’s article linked to me is running 10.11.5.

-I have tested the exact version that Apple tested. I use buddybuild as a build automation tool, and they sent me an email with the version that was uploaded to iTunes connect by them.

-The app makes network requests to https://greenrobot.com (and also incldues advertising and analytics libraries). No hardcoded IP addresses in my code. GreenRobot looks like it is setup for IPv6: https://ip6.nl/#greenrobot.com

回答1:

For what it's worth, I saw this as well and as discussed here, there's clearly a discrepancy between the documentation as of 6/14/16 and the App Review Team's setup.



回答2:

As I suspected this did not have to do with the advertising and analytics code, as commenters suggested. It had to do with server compatibility with IPv6. I use Linode. I had my linux server admin upgrade to IPv6 for me on my server. If advertising or analytics failed to connect, they would just silently fail, there is no issue with game play. The problem was talking to my game server, which didn't work under IPv6 only.

According to answer: https://stackoverflow.com/a/37689996/211457 I used this site to test my site's compatibility: http://ready.chair6.net/ - http://ready.chair6.net/?url=https://greenrobot.com

Interestingly, Apple.com, Google.com, Facebook.com, Twitter.com are all non compliant. The only other domain I could find that was totally compliant like my site now is is arin.net.

After making these changes my app is now approved. Note I also added some error checking regarding not having a connection and displaying an appropriate error screen. But since that other Stackoverflow poster also had IPv6 server problems, and it doesn't make a lot of sense that just adding error checking would cause the app to suddenly connect, I am pretty convinced it was a server problem.

Another interesting thing is I talked to an iOS developer on the phone who had an update approved after June 1st. They are using AWS and had no idea what I was talking about regarding AWS not working under IPv6. Very strange, unless Apple is only requiring IPv6 only on a percentage of apps.

edit: New information: from a comment below: "If your server has an IPv6 record (i.e. claims to support IPv6), but your server's IPv6 support is broken, then it won't work on IPv6 obviously. But if your sever doesn't have an IPv6 record at all (i.e. claims to IPv4-only), it should work without any problems."