【问题标题】:Switching from View 1 to Bluetooth settings..can't possible?从视图 1 切换到蓝牙设置..不可能?
【发布时间】:2013-06-28 07:38:13
【问题描述】:

我在从视图 1 切换到蓝牙设置时遇到问题,即在视图 1 中我给了 1 个按钮..单击该按钮我想切换到视图 2(蓝牙设置)..但它不能在 iPhone 中可能..因为我们无法访问 iPhone 的默认设置..为此我们必须创建应用程序首选项..

Q.1 有什么方法可以访问 iPhone 中的蓝牙默认设置?

Q.2 有没有官方链接可以提到我们无法访问默认设置?

我想要建议..请帮助.. 提前致谢

【问题讨论】:

    标签: iphone ios uinavigationcontroller bluetooth core-bluetooth


    【解决方案1】:

    应用程序无法将设置应用程序打开到特定屏幕。 MapMyFitness 之类的应用程序之所以打开首选项,是因为它们要求获得使用蓝牙低功耗的权限。首次使用时请求权限由CBCentralManager 管理。

    这些弹出窗口由系统框架自动显示。可以使用定位服务的purpose 属性自定义消息,这在蓝牙的情况下是不可能的。

    没有为此使用私有 API,因此没有理由拒绝该应用。

    归功于下面这个 SO 问题

    how some apps can open setting app programmatically within their app

    第二个。

    之前我们使用波纹管代码从应用程序打开设置页面:-

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

    但是现在到 ios5.0 之后它就可以工作了,之后这个就贬值了。直到现在,Apple 还没有提供用于在较新版本中实现这一点的 URL Schema。

    类似问题的链接和答案:-

    Call the official *Settings* app from my app on iPhone

    iPhone- Open Settings from my application iOS 6

    is it possible to open Settings App using openURL?

    Programmatically opening the settings app (iPhone)

    How can I open the Settings app when the user presses a button?

    iPhone: Opening Application Preferences Panel From App

    Open UIPickerView by clicking on an entry in the app's preferences - How to?

    Open the Settings app?

    【讨论】:

    • Nitin Gohel 感谢您的回复.. 你能给我答案吗?我的 Q.2
    • 我也提供了有关它的信息,在 stackOverflow 中你会得到很多类似的问题。
    • 向您的客户展示这个问题,并附上类似问题的链接
    猜你喜欢
    • 1970-01-01
    • 2013-11-14
    • 2012-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-04
    • 2023-04-06
    • 1970-01-01
    相关资源
    最近更新 更多