I don’t find a way to check if wifi is enabled on iOS.
I am currently creating tracking app and to increase user location we need wifi enabled.
So I want to ask user to enable wifi, but I want to check if it’s currently enabled or not.
Is there a way?
Question posted in Xcode
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
3
Answers
With https://github.com/react-native-netinfo/react-native-netinfo you can check it by:
You can use this code to check connection type :-
If connection type is wifi then ok if not you can display some popup to enable wifi.
You can use the following code to open settings, so user can easily enable their wifi
You can get desired status by below method. Write this method in native & access from React Native by using promise.
Refer:https://francescocrema.it/check-wifi-status-on-ios-in-swift/