You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DispatchQueue.main.async {
self.reachability.whenReachable = { reachability in
if reachability.connection == .wifi {
print("Reachable via WiFi")
} else {
print("Reachable via Cellular")
}
}
self.reachability.whenUnreachable = { _ in
print("Not reachable")
}
do {
try self.reachability.startNotifier()
} catch {
print("Unable to start notifier")
}
}
getting 3 syntex error assist.
whenReachability Cannot infer type of closure parameter 'reachability' without a type annotation
Why is this happening with one particular project when I go run this project all I see three red flags . What is happening here?
The text was updated successfully, but these errors were encountered:
DispatchQueue.main.async {
self.reachability.whenReachable = { reachability in
if reachability.connection == .wifi {
print("Reachable via WiFi")
} else {
print("Reachable via Cellular")
}
}
self.reachability.whenUnreachable = { _ in
print("Not reachable")
}
The text was updated successfully, but these errors were encountered: