解决iOS10不能跳转系统WiFi列表的问题
来源:互联网 发布:网络推广协议 编辑:程序博客网 时间:2024/05/15 00:05
第一种方式:
在iOS10更新后,系统设置跳转被禁用,只能跳转App设置,但是最近发现苹果又更新了URLscheme,亲测可用,建议iOS10已下,还用原来的scheme
#define iOS10 ([[UIDevice currentDevice].systemVersion doubleValue] >= 10.0)NSString * urlString = @"App-Prefs:root=WIFI";if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:urlString]]) { if (iOS10) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:nil]; } else { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]]; }}
第二种方式:
用到了私有API,慎用,若想使用并通过审核,可以对私有方法名等加密
NSURL*url=[NSURL URLWithString:@"Prefs:root=WIFI"]; Class LSApplicationWorkspace = NSClassFromString(@"LSApplicationWorkspace"); [[LSApplicationWorkspace performSelector:@selector(defaultWorkspace)] performSelector:@selector(openSensitiveURL:withOptions:) withObject:url withObject:nil];
附录:iOS10之后,其它界面的跳转
当前iOS10支持的所有跳转,亲测可用(测试系统:10.2.1)跳转 写法无线局域网 App-Prefs:root=WIFI蓝牙 App-Prefs:root=Bluetooth蜂窝移动网络 App-Prefs:root=MOBILE_DATA_SETTINGS_ID个人热点 App-Prefs:root=INTERNET_TETHERING运营商 App-Prefs:root=Carrier通知 App-Prefs:root=NOTIFICATIONS_ID通用 App-Prefs:root=General通用-关于本机 App-Prefs:root=General&path=About通用-键盘 App-Prefs:root=General&path=Keyboard通用-辅助功能 App-Prefs:root=General&path=ACCESSIBILITY通用-语言与地区 App-Prefs:root=General&path=INTERNATIONAL通用-还原 App-Prefs:root=Reset墙纸 App-Prefs:root=WallpaperSiri App-Prefs:root=SIRI隐私 App-Prefs:root=PrivacySafari App-Prefs:root=SAFARI音乐 App-Prefs:root=MUSIC音乐-均衡器 App-Prefs:root=MUSIC&path=com.apple.Music:EQ照片与相机 App-Prefs:root=PhotosFaceTime App-Prefs:root=FACETIME
0 0
- 解决iOS10不能跳转系统WiFi列表的问题
- ios10不能跳转wifi设置的解决
- iOS10 跳转系统wifi列表
- iOS10跳转系统设置、WIFI、蓝牙...
- iOS10跳转系统设置、WIFI、蓝牙…
- iOS,iOS10 跳转系统设置、WIFI、蓝牙…
- 解决KEIL搜索不能跳转的问题
- 解决同一个页面不能跳转的问题
- iOS10 不能跳转系统设置解决办法(1)
- iOS10 不能跳转系统设置解决办法(2)
- ubuntu系统如何解决电脑重启后不能自动连接wifi的问题
- iOS10跳转系统设置的正确姿势
- iOS10跳转系统设置的正确姿势
- iOS10 跳转系统设置
- Android系统6.0获取WiFi列表为空的问题
- 解决IE6下的 window.location.href 不能跳转问题
- iOS10跳转系统设置方法
- 解决Redhat BCM43142不能连接WIFI问题
- 带你玩转Visual Studio——VC++的多线程开发
- Spark系列修炼---入门笔记9
- Mac操作快捷键总结
- C含参数的宏与函数的区别
- 常用排序算法汇总
- 解决iOS10不能跳转系统WiFi列表的问题
- IP-TOS字段
- 支持向量机SVM引导
- 常用的网站和工具
- C与指针 五 矩阵相乘
- 如何修改WAMP中mysql默认空密码
- 将图片打造铅笔素描效果
- RadioGroup调用check()方法onCheckedChanged()调用多次
- mysql搭建(_mysql 安装-centos)