• <tfoot id='tkVfx'></tfoot>
      <bdo id='tkVfx'></bdo><ul id='tkVfx'></ul>
    <i id='tkVfx'><tr id='tkVfx'><dt id='tkVfx'><q id='tkVfx'><span id='tkVfx'><b id='tkVfx'><form id='tkVfx'><ins id='tkVfx'></ins><ul id='tkVfx'></ul><sub id='tkVfx'></sub></form><legend id='tkVfx'></legend><bdo id='tkVfx'><pre id='tkVfx'><center id='tkVfx'></center></pre></bdo></b><th id='tkVfx'></th></span></q></dt></tr></i><div id='tkVfx'><tfoot id='tkVfx'></tfoot><dl id='tkVfx'><fieldset id='tkVfx'></fieldset></dl></div>

    1. <small id='tkVfx'></small><noframes id='tkVfx'>

        <legend id='tkVfx'><style id='tkVfx'><dir id='tkVfx'><q id='tkVfx'></q></dir></style></legend>

        以编程方式在 iOS 中切换 AirPlane 模式

        时间:2023-05-19
          <tbody id='xFtOn'></tbody>

      1. <small id='xFtOn'></small><noframes id='xFtOn'>

          • <bdo id='xFtOn'></bdo><ul id='xFtOn'></ul>

              • <legend id='xFtOn'><style id='xFtOn'><dir id='xFtOn'><q id='xFtOn'></q></dir></style></legend>
                <tfoot id='xFtOn'></tfoot>
                <i id='xFtOn'><tr id='xFtOn'><dt id='xFtOn'><q id='xFtOn'><span id='xFtOn'><b id='xFtOn'><form id='xFtOn'><ins id='xFtOn'></ins><ul id='xFtOn'></ul><sub id='xFtOn'></sub></form><legend id='xFtOn'></legend><bdo id='xFtOn'><pre id='xFtOn'><center id='xFtOn'></center></pre></bdo></b><th id='xFtOn'></th></span></q></dt></tr></i><div id='xFtOn'><tfoot id='xFtOn'></tfoot><dl id='xFtOn'><fieldset id='xFtOn'></fieldset></dl></div>

                  本文介绍了以编程方式在 iOS 中切换 AirPlane 模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我想以编程方式在 iOS 中打开/关闭飞行模式.谷歌搜索后,我得到了以下一些链接,并关注了它们,

                  I want to on/off airplane mode in iOS programmatically. After googling, i got some of the following links, and followed them,

                  可达性飞行模式 (3G) 与 Wifi

                  使用私有框架:导入 RadioPreferences.h

                  检测 iPhone 是否处于飞行模式?

                  以上所有链接,告诉我使用 AppSupport.framework 和 RadiosPreferences.h.这给了我关于 airPlane 模式是打开还是关闭的状态,但这并没有让我改变飞行模式.

                  All of the above links, tell me to use AppSupport.framework and using RadiosPreferences.h. This is giving me the status about whether airPlane mode is on or off, But it doesn't make me to change the airplane mode.

                  然后我看到了这个链接,如何使用私有 API 在 IOS 5.1 中打开/关闭飞行模式,这为我提供了切换飞行模式的方法,但它使用的是权利,仅适用于越狱设备.有没有办法以编程方式设置飞行模式(可以使用私有 API,但不能使用权利).

                  Then i saw, this link, How to turn on/off airplane mode in IOS 5.1 using private API, that gives me the way for toggling airplane mode but it is using entitlements, which only works for jailbroken devices. Is there any way, to set Airplane mode programatically(can use private APIs but not entitlements).

                  推荐答案

                  每个 App Store 应用程序都被沙盒化并带有权利.

                  Every single App Store app is sandboxed with entitlements.

                  如果您想在 App Store 中分发您的应用程序,那么您想要实现的目标根本不可能.您的应用程序根本无法获得足够的权限来实现远程类似的任何事情.您无法设置更改系统行为的全局设置.Apple 绝不允许这样做.

                  What you are trying to achieve is simply not possible if you want to distribute your app in the App Store. Your App simply cannot get enough privileges to achieve anything remotely similar. You cannot set global settings that changes the behaviour of the system. Apple will never allow that.

                  您最多可以通过可达性监控网络连接的状态,但仅此而已.使用私有 API = 直接应用拒绝.

                  At the best you can monitor the status of the network connectivity via reachability but this is pretty much it. Using private API = straight app rejection.

                  这篇关于以编程方式在 iOS 中切换 AirPlane 模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 Xcode 4 中添加框架 下一篇:将quartzcore添加到Xcode 4 for iOS

                  相关文章

                    <bdo id='o0SW1'></bdo><ul id='o0SW1'></ul>
                  1. <tfoot id='o0SW1'></tfoot>
                    <i id='o0SW1'><tr id='o0SW1'><dt id='o0SW1'><q id='o0SW1'><span id='o0SW1'><b id='o0SW1'><form id='o0SW1'><ins id='o0SW1'></ins><ul id='o0SW1'></ul><sub id='o0SW1'></sub></form><legend id='o0SW1'></legend><bdo id='o0SW1'><pre id='o0SW1'><center id='o0SW1'></center></pre></bdo></b><th id='o0SW1'></th></span></q></dt></tr></i><div id='o0SW1'><tfoot id='o0SW1'></tfoot><dl id='o0SW1'><fieldset id='o0SW1'></fieldset></dl></div>
                  2. <small id='o0SW1'></small><noframes id='o0SW1'>

                    <legend id='o0SW1'><style id='o0SW1'><dir id='o0SW1'><q id='o0SW1'></q></dir></style></legend>