美文网首页
iOS上架 prefs:root= 被拒解决

iOS上架 prefs:root= 被拒解决

作者: Fendouzhe | 来源:发表于2018-07-09 15:11 被阅读0次

例如跳转Wi-Fi,之前是使用prefs:root=WIFI或者App-Prefs:root=WIFI来进行跳转

//iOS10
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"] options:@{} completionHandler:nil];
//
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]];

这样在上架的时候会被拒

解决方法

中间进行一个转码,绕过苹果的代码扫描,亲测能过审核.

//将上面的跳转字符串转成字符,在进行拼接就好了
NSData *encryptString = [[NSData alloc] initWithBytes:(unsigned char []){0x70,0x72,0x65,0x66,0x73,0x3a,0x72,0x6f,0x6f,0x74,0x3d,0x4e,0x4f,0x54,0x49,0x46,0x49,0x43,0x41,0x54,0x49,0x4f,0x4e,0x53,0x5f,0x49,0x44} length:27];

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

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:string] options:@{} completionHandler:nil];

给一个转换的网站
http://www.ab126.com/goju/1711.html

相关文章

网友评论

      本文标题:iOS上架 prefs:root= 被拒解决

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