Last active
October 14, 2020 05:10
-
-
Save olxios/9a1f96929228958e4a7efc5c47e3146f to your computer and use it in GitHub Desktop.
[Private iOS API] Toggle Airplane Mode: http://swiftiostutorials.com/jailbreak-development-toggle-airplane-mode-programmatically/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* You can find private iOS frameworks bundled with Xcode: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/PrivateFrameworks/ | |
In Xcode 7.3 beta private frameworks have been removed from the Xcode bundle. As a workaround you'd have to load the framework at runtime | |
Please find the generated RadiosPreferences header here: https://raw.githubusercontent.com/nst/iOS-Runtime-Headers/master/PrivateFrameworks/AppSupport.framework/RadiosPreferences.h | |
*/ | |
#import <AppSupport/RadiosPreferences.h> | |
@implementation AirplaneModeUtil | |
+ (void)toggleAirplaneMode | |
{ | |
RadiosPreferences *preferences = [[RadiosPreferences alloc] init]; | |
[preferences setAirplaneMode:!preferences.airplaneMode]; | |
[preferences synchronize]; | |
} | |
@end |
Worked for me! iOS 11, injected into SpringBoard. Thanks! 👌
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can`t work