Skip to content

Instantly share code, notes, and snippets.

@olxios
Last active October 14, 2020 05:10
Show Gist options
  • Select an option

  • Save olxios/9a1f96929228958e4a7efc5c47e3146f to your computer and use it in GitHub Desktop.

Select an option

Save olxios/9a1f96929228958e4a7efc5c47e3146f to your computer and use it in GitHub Desktop.
/* 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
@CaiChenghan

Copy link
Copy Markdown

can`t work

@AnthoPakPak

Copy link
Copy Markdown

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