How to know the permission of network for my app

Is it possible.I want to make a user guided if the permission of network is off.

Replies

For WWAN, you can get this state via CTCellularData in the Core Telephony framework.

For Wi-Fi (which is only access controlled on iPhones built for China), there’s no equivalent public API. I encourage you to file an enhancement request for that. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"