Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Toggling AirPlane mode in iOS Programmatically

I want to on/off airplane mode in iOS programmatically. After googling, i got some of the following links, and followed them,

Reachability airplane mode (3G) vs. Wifi

Using Private Framework: Importing RadioPreferences.h

Detect if iPhone is in Airplane mode?

All of the above links, tell me to use AppSupport.framework and using RadiosPreferences.h. This is giving me the status about whether airPlane mode is on or off, But it doesn't make me to change the airplane mode.

Then i saw, this link, How to turn on/off airplane mode in IOS 5.1 using private API, that gives me the way for toggling airplane mode but it is using entitlements, which only works for jailbroken devices. Is there any way, to set Airplane mode programatically(can use private APIs but not entitlements).

like image 556
Mehul Thakkar Avatar asked Dec 09 '13 11:12

Mehul Thakkar


1 Answers

Every single App Store app is sandboxed with entitlements.

What you are trying to achieve is simply not possible if you want to distribute your app in the App Store. Your App simply cannot get enough privileges to achieve anything remotely similar. You cannot set global settings that changes the behaviour of the system. Apple will never allow that.

At the best you can monitor the status of the network connectivity via reachability but this is pretty much it. Using private API = straight app rejection.

like image 66
Tibidabo Avatar answered Oct 02 '22 13:10

Tibidabo