gpt4 book ai didi

ios - 我如何知道我的 iOS 应用程序的蜂窝访问是否被禁用?

转载 作者:IT王子 更新时间:2023-10-29 08:19:29 25 4
gpt4 key购买 nike

我有一个 iOS 应用程序,它在应用程序启动时发出一些小的网络请求(资源更新等)。如果用户在 iOS 设置中关闭该应用程序的蜂窝访问,他们会在每次启动时从 iOS 收到有关网络使用情况的提示。有没有办法以编程方式知道此应用的蜂窝数据已被禁用,以便我可以在启动时禁用请求?

最佳答案

所以我在 Apple 开发论坛上从一位 Apple 工程师 (https://devforums.apple.com/message/1059332#1059332) 那里找到了这个。

Another developer wrote in to DTS and thus I had a chance to investigate this in depth. Alas, the news is much as I expected: there is no supported way to detect that your app is in this state. Nor is there a way to make a "no user interaction" network connection, that is, request that the connection fail rather than present UI like this. If these limitations are causing problems for your app, I encourage you to file a bug describing your specific requirements.
https://developer.apple.com/bug-reporting/

所以看起来无法检测到您的应用程序的蜂窝数据是否已关闭。

编辑

我为此提交了一份雷达,要求添加它。我刚刚在我的雷达中收到此通知

We believe this issue has been addressed in the latest iOS 9 beta.

我查看了 API 差异,但到目前为止我找不到新的 API。

关于ios - 我如何知道我的 iOS 应用程序的蜂窝访问是否被禁用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22563526/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com