一些应用如何在他们的应用程序中以编程方式打开设置应用 [英] how some apps can open setting app programmatically within their app

查看:119
本文介绍了一些应用如何在他们的应用程序中以编程方式打开设置应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有很多问题:如何以编程方式打开设置应用程序?答案是大不了。我知道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 首次使用时。

Apps cannot open the settings application to a specific screen. The reason that apps like MapMyFitness open preferences is because they ask for permission to use Bluetooth Low Energy. Asking for permission is managed by CBCentralManager on first usage.

这也是知道蓝牙是打开还是关闭的类。它将自动显示警报,并带有进入设置以打开蓝牙的选项。

This is also the class that knows if Bluetooth is turned on or off. It will show an alert automatically with an option to go into settings to turn bluetooth on.

使用位置服务时会显示类似的弹出窗口。

A similar popup will be shown when using location services.

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

These popups are shown automatically by the system framework. The message can be customized using the purpose property for location services, that is not possible in case of Bluetooth.

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

No private API was used for this, so there's no reason for the app to be rejected.

这篇关于一些应用如何在他们的应用程序中以编程方式打开设置应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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