美文网首页
跳转iPhone设置页面,绕过审核

跳转iPhone设置页面,绕过审核

作者: IreneWang1988 | 来源:发表于2018-08-16 09:22 被阅读0次

跳转iPhone设置页面之前都是通过 App-Prefs:root=WIFI  来跳转,但是2018年6月废弃了这个函数,被认为是私有函数,审核会被拒绝。

有心人采用了字符串转码的方式来规避。

代码如下:

CGFloat systemVersion = [[[UIDevice currentDevice] systemVersion] floatValue];

        NSData *encryptString = [[NSData alloc] initWithBytes:(unsigned char []){0x41,0x70,0x70,0x2d,0x50,0x72,0x65,0x66,0x73,0x3a,0x72,0x6f,0x6f,0x74,0x3d,0x57,0x49,0x46,0x49} length:19];

        //@"App-Prefs:root=WIFI中间进行一个转码,绕过苹果的代码扫描.

        NSString *string = [[NSString alloc] initWithData:encryptString encoding:NSUTF8StringEncoding];

          NSURL * url = [NSURL URLWithString:string];

        if (systemVersion >= 8.0 && systemVersion < 10.0) {  // iOS8.0 和 iOS9.0

            if ([[UIApplication sharedApplication] canOpenURL:url]) {

                [[UIApplication sharedApplication] openURL:url];

            }

        }else if (systemVersion >= 10.0) {  // iOS10.0及以后

            if ([[UIApplication sharedApplication] canOpenURL:url]) {

                if (@available(iOS 10.0, *)) {

                    [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {

                    }];

                }

            }

        }

2: 代码写 后还是不能跳转,是因为没有在配置文件的info 当中添加scheme,如图添加后就可以跳转了。

3;分享一个文字转二进制,十六进制的在线地址, App-Prefs:root=WIFI 转换成16进制就是在这个网址上弄得。

【链接】ASCII在线转换器

http://www.ab126.com/goju/1711.html

相关文章

网友评论

      本文标题:跳转iPhone设置页面,绕过审核

      本文链接:https://www.haomeiwen.com/subject/hphnbftx.html