问题描述
我知道有很多问题:如何以编程方式打开设置应用程序?答案是大不了。我知道Apple不支持在iOS 5.0之后从任何其他应用程序打开设置。
I know there are many questions: "How to open setting app programatically?" and the answer is "BIG NO". I know that Apple does not support opening Settings from any other app after iOS 5.0.
但是有些应用程序如MapMyFitness可以打开设置,它们可以在App Store已获Apple批准。如果蓝牙已关闭,MapMyFitness将打开蓝牙设置。我在iOS 6和iOS 5.1中检查过这个。
But there are some apps like MapMyFitness which can open Settings, and they are available in the App Store and have been approved by Apple. MapMyFitness opens the Bluetooth settings if Bluetooth is turned off. I have checked this in iOS 6 and iOS 5.1.
我想知道这些应用程序如何能够合法地打开设置并绕过Apple安全性,因为根据我的信息,这是不合法的方法吗?
I want to know how can these apps are able to open Settings legally and bypassed Apple security because as per my information there is no legal way to do it?
推荐答案
应用程序无法打开特定屏幕的设置应用程序。像MapMyFitness这样的应用程序打开首选项的原因是因为他们要求使用Bluetooth Low Energy的许可。请求权限由 CBCentralManager 首次使用时。
这也是知道蓝牙是打开还是关闭的类。它将自动显示警报,并带有进入设置以打开蓝牙的选项。
A similar popup will be shown when using location services.
这些弹出窗口由系统框架自动显示。可以使用目的
属性为位置服务自定义消息,这在蓝牙的情况下是不可能的。
No private API was used for this, so there's no reason for the app to be rejected.
这篇关于一些应用如何在他们的应用程序中以编程方式打开设置应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!