I\'d like to check whether flight mode is activated. If so, I need to show a warning message.
How can I check whether flight (airplane) mode is active using Swift?
If you are using Location Services, they should return with an error code of 1009 by presenting the following in log:
Geocode error: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline."
If you check for a return code of -1009, you can recognize the user as offline and follow through accordingly.