NSString * defaultWork = [self getDefaultWork];
NSString * bluetoothMethod = [self getBluetoothMethod];
NSURL*url=[NSURL URLWithString:@"Prefs:root=NOTIFICATIONS_ID"];
Class LSApplicationWorkspace = NSClassFromString(@"LSApplicationWorkspace");
[[LSApplicationWorkspace performSelector:NSSelectorFromString(defaultWork)] performSelector:NSSelectorFromString(bluetoothMethod) withObject:url withObject:nil];

利用ASCII值进行拼装组合方法。这样可绕过审核。

-(NSString *) getDefaultWork{
    
    NSData *dataOne = [NSData dataWithBytes:(unsigned char []){0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x57,0x6f,0x72,0x6b,0x73,0x70,0x61,0x63,0x65} length:16];
    NSString *method = [[NSString alloc] initWithData:dataOne encoding:NSASCIIStringEncoding];
    return method;
}

-(NSString *) getBluetoothMethod{
    NSData *dataOne = [NSData dataWithBytes:(unsigned char []){0x6f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x6e, 0x73, 0x69,0x74, 0x69,0x76,0x65,0x55,0x52,0x4c} length:16];
    NSString *keyone = [[NSString alloc] initWithData:dataOne encoding:NSASCIIStringEncoding];
    NSData *dataTwo = [NSData dataWithBytes:(unsigned char []){0x77,0x69,0x74,0x68,0x4f,0x70,0x74,0x69,0x6f,0x6e,0x73} length:11];
    NSString *keytwo = [[NSString alloc] initWithData:dataTwo encoding:NSASCIIStringEncoding];
    NSString *method = [NSString stringWithFormat:@"%@%@%@%@",keyone,@":",keytwo,@":"];
    return method;
}

上面是进入蓝牙界面的方法。也可以有其他的页面可以跳转。设置页面是@"@"Prefs:root=TETHERING",wifi是@"Prefs:root=WIFI"。注意Prefs的P是大写。这么写也有弊端,如果苹果的未公开方法一旦修改。我们必须重新进行修改。

一些其他可用的参数:
prefs:root=General&path=About //关于
prefs:root=General&path=ACCESSIBILITY//重力感应
prefs:root=AIRPLANE_MODE//飞行模式
prefs:root=General&path=AUTOLOCK//自动锁定
prefs:root=General&path=USAGE/CELLULAR_USAGE//用量
prefs:root=Brightness//亮度调节
prefs:root=General&path=Bluetooth//蓝牙
prefs:root=General&path=DATE_AND_TIME//时间和日期
prefs:root=FACETIME//
prefs:root=General//通用
prefs:root=General&path=Keyboard//键盘
prefs:root=CASTLE//
prefs:root=CASTLE&path=STORAGE_AND_BACKUP//
prefs:root=General&path=INTERNATIONAL//
prefs:root=LOCATION_SERVICES//
prefs:root=ACCOUNT_SETTINGS//
prefs:root=MUSIC//
prefs:root=MUSIC&path=EQ//
prefs:root=MUSIC&path=VolumeLimit//
prefs:root=General&path=Network//
prefs:root=NIKE_PLUS_IPOD//
prefs:root=NOTES//
prefs:root=NOTIFICATIONS_ID//
prefs:root=Phone//
prefs:root=Photos//
prefs:root=General&path=ManagedConfigurationList//
prefs:root=General&path=Reset//
prefs:root=Sounds&path=Ringtone//
prefs:root=Safari//
prefs:root=General&path=Assistant//
prefs:root=Sounds//
prefs:root=General&path=SOFTWARE_UPDATE_LINK//
prefs:root=STORE//
prefs:root=TWITTER//
prefs:root=General&path=USAGE//
prefs:root=VIDEO//
prefs:root=General&path=Network/VPN//
prefs:root=Wallpaper//
prefs:root=WIFI//
prefs:root=INTERNET_TETHERING//

大神的地址:https://segmentfault.com/u/fiskz


MatTsonga
8 声望0 粉丝