iOS 隐私权限和通过openURL实现跳转实例_第1页
iOS 隐私权限和通过openURL实现跳转实例_第2页
iOS 隐私权限和通过openURL实现跳转实例_第3页
iOS 隐私权限和通过openURL实现跳转实例_第4页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

第iOS隐私权限和通过openURL实现跳转实例以上只是列举了比较常见的。平时开发中,和手机数据交互,但代码没有问题,出现无端bug时可以考虑下是不是隐私权限问题。

二、openUrl

开发中使用以下代码可以实现快速拨打电话

NSString*phoneVersion=[[UIDevicecurrentDevice]systemVersion];

if(phoneVersion.floatValue10.0){

//iOS10以前使用

[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@Tel://123456]];

else{

//iOS10以后使用

[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@Tel://123456]

options:@{}

completionHandler:nil];

只要给出对应的URL,系统就可以直接跳:

//拨打电话

[NSURLURLWithString:@tel://123456]

//发送短信

[NSURLURLWithString:@sms://123456]

//发邮件

[NSURLURLWithString:@mailto://123456@163.com]

//前往AppStore

[NSURLURLWithString:@itms-apps://]

//使用Safari访问网址

[NSURLURLWithString:@]

//前往iBook

[NSURLURLWithString:@itms-books://]

//发起Facetime

[NSURLURLWithString:@facetime://]

//8、调用地图Map

[NSURLURLWithString:@maps://]

//9、调用Music

[NSURLURLWithString:@music://]

//10、跳转到系统设置相关界面

//iOS10以前

[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@prefs:root=LOCATION]options:@{}completionHandler:nil];

//iOS10以后

[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@App-Prefs:root=LOCATION]options:@{}completionHandler:nil];

#pragmamark-以下为跳转设置的对应方式

[NSURLURLWithString:UIApplicationOpenSettingsURLString]

//iCloud

[NSURLURLWithString:@App-Prefs:root=CASTLE]

//WIFI

[NSURLURLWithString:@App-Prefs:root=WIFI]

[NSURLURLWithString:@App-Prefs:root=Bluetooth]

//蜂窝数据

[NSURLURLWithString:@App-Prefs:root=MOBILE_DATA_SETTINGS_ID]

[NSURLURLWithString:@App-Prefs:root=NOTIFICATIONS_ID]

[NSURLURLWithString:@App-Prefs:root=General]

//关于手机

[NSURLURLWithString:@App-Prefs:root=Generalpath=About]

//辅助功能

[NSURLURLWithString:@App-Prefs:root=Generalpath=ACCESSIBILITY]

//日期与时间

[NSURLURLWithString:@App-Prefs:root=Generalpath=DATE_AND_TIME]

//键盘设置

[NSURLURLWithString:@App-Prefs:root=Generalpath=Keyboard]

//显示与亮度

[NSURLURLWithString:@App-Prefs:root=DISPLAY]

//墙纸设置

[NSURLURLWithString:@App-Prefs:root=Wallpaper]

[NSURLURLWithString:@App-Prefs:root=Sounds]

//Siri

[NSURLURLWithString:@App-Prefs:root=Siri]

[NSURLURLWithString:@App-Prefs:root=Privacy]

[NSURLURLWithString:@App-Prefs:root=Privacypath=LOCATION]

//电池电量

[NSURLURLWithString:@App-Prefs:root=BATTERY_USAGE]

//iTunesStore与AppStore

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论