iOS App审核 因IPv6遭到拒绝

问题描述:
在iTunes Connect 中苹果发来回复:
We discovered one or more bugs in your app when reviewed on iPad and iPhone running iOS 10.3.1 on Wi-Fi connected to an IPv6 network.
解决:
1.让服务器支持IPv6协议
2.或模拟IPv6环境 (谷歌或百度搜索 很多教程),测试哪里出了问题
如:我的是因为AFNetworking 被拒 
解决:2.1 更改为最新的AFNetworking :https://github.com/AFNetworking/AFNetworking
或 2.2  查看项目中 AFNetworkReachabilityManager Class 是否包含AF_INET、struct sockaddr_in 。
将:
+ (instancetype)sharedManager {    
    static AFNetworkReachabilityManager *_sharedManager = nil;    
    static dispatch_once_t onceToken;    
    dispatch_once(&onceToken, ^{    
        struct sockaddr_in address;    
        bzero(&address, sizeof(address));    
        address.sin_len = sizeof(address);    
        address.sin_family = AF_INET;    
    
        _sharedManager = [self managerForAddress:&address];    
    });    
    
    return _sharedManager;    
}    

改为:
+ (instancetype)sharedManager {    
    static AFNetworkReachabilityManager *_sharedManager = nil;    
    static dispatch_once_t onceToken;    
    dispatch_once(&onceToken, ^{    
        _sharedManager = [self manager];    
    });    
    
    return _sharedManager;    
}    
    
+ (instancetype)manager    
{    
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)    
    struct sockaddr_in6 address;    
    bzero(&address, sizeof(address));    
    address.sin6_len = sizeof(address);    
    address.sin6_family = AF_INET6;    
#else    
    struct sockaddr_in address;    
    bzero(&address, sizeof(address));    
    address.sin_len = sizeof(address);    
    address.sin_family = AF_INET;    
#endif    
    return [self managerForAddress:&address];    
} 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值