They sent Reject from the sidebar:

Performance - 2.1

Also, we were unable to review your app as it crashed on launch. I have attached detailed crash logs to help troubleshoot this issue.

Next Steps

  1. Please revise your IPv6 network connection. Since your iTunes Connect is a Rejected, a new binary will be required.
  2. The new binary.

Resources

For information on how to log crash logs, please click here. Note: TN2151 Understanding and Analyzing Application Crash Reports . For additional information about supporting IPv6 Networks, please refer to IPv6 Supporting DNS64 / NAT64 Networks and Supporting IPv6-only Networks . For a networking overview, please see About Networking .

The problem is that if there is a non-working Internet (network 100% loss), the program cannot get data from the firebase, and the download is endless without getting into the CancelBlock. I can’t think of a crutch either, since I tried all kinds of checks on the Internet (they don’t help).

Here is the log:

app_instance_id=C2F4F7BE218E4810A18090E113C9B7FF&platform=ios&gmp_version=3600, _kCFStreamErrorCodeKey=-2103, NSErrorFailingURLKey=https://app-measurement.com/config/app/1:714764542827.., NSLocalizedDescription=The request timed out., _kCFStreamErrorDomainKey=4} 

Here is the function in which the problem is:

 typealias CompletionHandler = (_ success:Bool) -> Void func loadCDDAta(completionHandler: @escaping CompletionHandler) { ref = FIRDatabase.database().reference() ref.observeSingleEvent(of: .value, with: { (snapshot: FIRDataSnapshot) in if snapshot.exists() && snapshot.value != nil { let value = snapshot.value as? NSDictionary self.deleteRecords() if let f = value?["Place"] as? [String:AnyObject] { CoreDataManager.instance.saveCDDict(f) } else if let f = value?["Place"] as? [AnyObject] { CoreDataManager.instance.saveCDArray(f) } completionHandler(true) print("completionHandler(true)") } else { completionHandler(false) print("completionHandler(false)") } }, withCancel: { (error: Error) in completionHandler(false) print("completionHandler(false)") }) } 

Screen shot code

    1 answer 1

    Resolved by checking internet availability

    import Foundation import SystemConfiguration

    public class NetworkCheckingClass {

      class func isConnectedToNetwork(resultHandler: @escaping (_ isTrue: Bool) -> Void) { let defaults = UserDefaults.standard let urlA = NSURL(string: "http://google.com/") let urlB = NSURL(string: "http://baidu.com/") let urlDict:[String:NSURL] = ["A":urlA!, "B":urlB!] var preference = "A" if let temp = defaults.string(forKey: "preferredNetworkURL") { preference = temp //check the last successful URL or A by default } else { defaults.set(preference, forKey: "preferredNetworkURL") } NetworkCheckingClass.fetchURL(url: urlDict[preference]!, pref:preference) { isTrue in if isTrue == true { print("NETWORK STATUS: \(isTrue)") resultHandler(isTrue) } else { //check the URL which hasn't been checked if preference == "A" { preference = "B" } else { preference = "A" } NetworkCheckingClass.fetchURL(url: urlDict[preference]!, pref:preference) { isTrue in print("NETWORK STATUS: \(isTrue)") resultHandler(isTrue) } //if preference "B" returns true, then Baidu.com is available and user is likely in a country where Google is blocked } } } class func fetchURL(url:NSURL, pref:String, resultHandler: @escaping (_ isTrue: Bool) -> Void) { print("URL PREFERENCE: \(pref)") let defaults = UserDefaults.standard let request = NSMutableURLRequest(url: url as URL) request.httpMethod = "HEAD" request.cachePolicy = NSURLRequest.CachePolicy.reloadIgnoringLocalAndRemoteCacheData request.timeoutInterval = 10.0 var returnBool = false let session = URLSession(configuration: .default) let dataTask = session.dataTask(with: request as URLRequest) { ( data, response, error) in if let httpResponse = response as? HTTPURLResponse { if httpResponse.statusCode == 200 { defaults.set(pref, forKey: "preferredNetworkURL") //remember the URL that succeeded and check it first next time returnBool = true resultHandler(returnBool) } else { returnBool = false resultHandler(returnBool) } } else { returnBool = false resultHandler(returnBool) } } dataTask.resume() } 

    }