我的应用由于IPV6问题而被应用商店拒绝。这是App Store提供的信息
我该如何解决这个问题?
最佳答案
我在iOS中遇到了这个问题。比我更改可及性类的互联网连接方法并批准我的应用程序。如果要在系统中建立Ipv6网络,请检查
https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html
objective-c
+ (instancetype)reachabilityForInternetConnection
{
struct sockaddr_in6 zeroAddress;
bzero(&zeroAddress, sizeof(zeroAddress));
zeroAddress.sin6_len = sizeof(zeroAddress);
zeroAddress.sin6_family = AF_INET6;
return [self reachabilityWithAddress: (const struct sockaddr *) &zeroAddress];
}
swift 3
func ipv6Reachability() -> SCNetworkReachability?
{
var zeroAddress = sockaddr_in6()
zeroAddress.sin6_len = UInt8(MemoryLayout<sockaddr_in>.size)
zeroAddress.sin6_family = sa_family_t(AF_INET6)
return withUnsafePointer(to: &zeroAddress, {
$0.withMemoryRebound(to: sockaddr.self, capacity: 1) {
SCNetworkReachabilityCreateWithAddress(nil, $0)
}
})
}
关于ios - 由于IPV6问题,App被App Store拒绝,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43797597/