苹果审核之遇到IPV6问题被拒的解决方法

  • 情景:

  等待苹果审核上线时,发现因为IPV6被拒了。这是悲剧,以下是苹果审核给我的理由:

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

Specifically, your app displayed an error message upon launch.

Next Steps

To resolve this issue, please run your app on a device 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 testing your app and preparing it for review, please see Technical Note TN2431: App Testing Guide. 

For a networking overview, please review About Networking. For a more specific overview of App Review’s IPv6 requirements, please review the IPv6 and App Review discussion on the Apple Developer Forum.

Please see attached screenshot for details.


  还附了一张图:

 

  • 思考与排查:

     用自己的网络请求是没有任何问题的,但是到了苹果审核就提示网络问题;但是,首页的数据已经出来了,这个说明,其实接口在ipv6的情况下是可以调用的,排除链接不上ipv6网络的问题。那么这个网络请求失败是哪里来的呢?

     与朋友几番讨论,可能存在这样的问题:就是在申请网络使用权限之前,就开始走网络请求了,因此在申请网络使用权限之前的借口会被拒,导致接口请求失败。

  • 解决方法:

  顺着这个思路,做了一个投机取巧的方法,就是在appdelegate的didFinishLauch方法里面,先调用一个不相干的接口,比如“百度”,这样第一个申请网络请求的接口不通过也不会导致程序其他的相关接口。

  • 代码如下:

第一步:声明一个调用百度请求的方法 

第二步:在appdelegate调用这个方法

 

  按照这个修改,重新提交了一个版本,第二天审核就通过了。

 

  此方法仅供参考,望遇到类似问题的队友们能有所帮助。

 

 
 
 
 
 
 
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值