不要在iOS上显示细胞数据警告 [英] Don't show cellular data warning on iOS

查看:134
本文介绍了不要在iOS上显示细胞数据警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果用户在每次尝试打开应用时决定不允许应用访问移动数据,则会向用户显示警告,告知他们已关闭移动数据。
SDK中是否有一种方法可以停止显示此消息或控件何时/何时显示?

If a user decides to not allow an app to access cellular data every time they try to open the app they are shown a warning telling them that cellular data is turned off. Is there a way in the SDK to stop showing this message or control when / where it is displayed?

推荐答案

如果您在撤销权限时尝试访问Internet,系统将显示此消息。为防止它出现,您可以使用Apple的可达性用于检测网络可用性的代码,并且仅在网络可用时才进行Web呼叫。

The system will show this message if you try to access the Internet when permission has been revoked. To prevent it from appearing, you could use Apple's Reachability code to detect network availability, and only make web calls if the network is available.

另请参阅这个StackOverflow帖子

这篇关于不要在iOS上显示细胞数据警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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