I've included my code below. If there's no wifi and no cellular service, the app freezes. If I turn cellular off altogether, it prints ""Not reachable", which is expected, and the app works fine. But if there's no service and cellular is on, (for instance, in the subway), it says "reachable via cellular" and I can't interact with the app. It's just frozen, even though that code is on the background thread.
let reachability = Reachability()
@IBAction func rateButtonAction(_ sender: Any) {
if #available(iOS 10.3, *) {
DispatchQueue.global(qos: .background).async {
if self.reachability?.connection == .wifi {
print("Reachable via WiFi")
SKStoreReviewController.requestReview()
} else if self.reachability?.connection == .cellular {
print("Reachable via Cellular")
SKStoreReviewController.requestReview()
} else if self.reachability?.connection == .none {
print("Not reachable")
} else {
print("Not reachable")
}
}
} else {
print("Rate didn't work")
}
}