iPhone-从我的应用程序iOS 6打开设置 [英] iPhone- Open Settings from my application iOS 6

查看:219
本文介绍了iPhone-从我的应用程序iOS 6打开设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有很多与此相关的问题。

I know there are many questions related to this.

1)是否可以使用openURL打开设置应用程序?

2)从另一个应用程序打开设置应用程序

3) iOS启动设置 - >限制URL方案

我已经按照这些问题进行了参考,但这并没有解决我的问题。我知道使用 openURL 方法可以打开设置,但这仅适用于iOS 5.0 - 5.0.1。在iOS 5.1中,它已被弃用。

I have followed these questions for reference but that does not solve my query. I know that using openURL method you can open Settings but that was valid for only iOS 5.0 - 5.0.1. In iOS 5.1 it was deprecated.

  [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs://"]]; 

我仍然看到许多应用程序主要基于位置,要求用户启用位置服务的权限并直接转到设置 - >隐私下的位置服务下面显示安装在iOS 6.1运行设备上的应用的屏幕截图显示点击设置会带您直接位置服务

Still I have been seeing lot of Apps mainly location based which asks for user permission to turn on Location Services and takes directly to Location Services under Settings--> Privacy. The screenshot of an App, which is installed on iOS 6.1 running device, below shows that tapping on Settings take you to directly Location Services.

我试图在我的应用程序中运行代码但它无法正常工作(我想将用户带到设置页面以允许我的应用程序直接从我的应用程序访问联系信息) 。如果Apple为此禁用了URL方案,那么许多应用程序仍在使用它?

I tried to run code in my App but it is not working (I want to take user to Settings page to allow my app to access contact information directly from my App). If Apple has disabled URL Schemes for this how come many Apps are still using it?

推荐答案

对于与位置等服务相关的应用,第一次他们请求访问操作系统将使用链接到设置的按钮抛出警报。这不是由应用程序操作,而是由操作系统的底层安全性操作。

For apps that tie into services such as Location, the first time they request access the OS will throw out the alert with buttons that link to Settings. This isn't actioned by the app, but by the underlying security of the OS.

iOS 6删除了您自己提到的功能。

iOS 6 removed the ability to do this yourself as you mentioned.

这篇关于iPhone-从我的应用程序iOS 6打开设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆