User PN User PN - 1 year ago 146
iOS Question

App store rejected my app 2 time with same issue

I completed my first app and try to submit and app store rejected it 2 time with same reason they send me:

We discovered one or more bugs in your app when reviewed on an iPhone
running iOS 9.3.2 on Wi-Fi. - During review we were unable to sign
into the app as a network error occurred Next Steps

Please run your app on a device to identify the issue(s), then revise
and resubmit your app for review.

Apps are reviewed on an IPv6 network. Please ensure that your app
supports IPv6 networks, as IPv6 compatibility is required.

But i tested in my devices with wifi, cellular every type of network it was working fine now m not getting what is the issue i need a solution.

Answer Source

Apple has made IPv6 mandatory since this June. but the library currently do not support IPv6. So what you need to do is copy the library in the main bundle and change the following in NetworkReachabilityManager.swift file

public convenience init?() {
    var address = sockaddr_in()
    address.sin_len = UInt8(sizeofValue(address))
    address.sin_family = sa_family_t(AF_INET6) // Change this from AF_INET to AF_INET6

    guard let reachability = withUnsafePointer(&address, {
        SCNetworkReachabilityCreateWithAddress(nil, UnsafePointer($0))
    }) else { return nil }

    self.init(reachability: reachability)

If you are using Pod in your project, you need to unlock the file to change. But again, when ever you will update the Pods, do remember to change AF_INET to AF_INET6

Check You Pod here and select the file as shown

enter image description here

Change AF_INET to AF_INET6 and then you will receive a alert to unlock the file and save the file

enter image description here