Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot infer contextual base in reference to member 'wifi' #417

Open
kundancodelab opened this issue Jul 20, 2024 · 0 comments
Open

Cannot infer contextual base in reference to member 'wifi' #417

kundancodelab opened this issue Jul 20, 2024 · 0 comments

Comments

@kundancodelab
Copy link

kundancodelab commented Jul 20, 2024

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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant