Reputation: 2420
I've been trying to get my application approved in the app store for quite some time now. Each time apple rejects it saying they could not load content in ipv6 network.
To start with, I am from Nepal and the isp here does not provide ipv6 support till now in our connection. I have made some friends in Canada and USA as my external testers, and my app is working smoothly there. As Apple suggested, I created a virtual ipv6 hotspot from my mac mini, and the content is loading nicely here in Nepal too, but they keep say its not loading when they try to review. So what is up with apple review team, i did all the things they suggested.
I am using Alamofire 3.4.1 for networking, and researched abit to find out, Almofire surely is ipv6 complaint.
I really need the app in app store soon. Any insight would be really appreciated.
Upvotes: 0
Views: 171
Reputation: 2420
I found a solution though I don't know if its the best practice or not, but my app got accepted. All I did was added a single character in NetworkReachabilityManager class of alamofire.
public convenience init?() {
var address = sockaddr_in()
address.sin_len = UInt8(sizeofValue(address))
address.sin_family = sa_family_t(AF_INET)
guard let reachability = withUnsafePointer(&address, {
SCNetworkReachabilityCreateWithAddress(nil, UnsafePointer($0))
}) else { return nil }
self.init(reachability: reachability)
}
changed line
address.sin_family = sa_family_t(AF_INET)
to
address.sin_family = sa_family_t(AF_INET6)
Do let me know, if there might be some issue by doing this.
Upvotes: 1