Don't show cellular data warning on iOS

删除回忆录丶 提交于 2019-12-12 11:33:45

问题


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?


回答1:


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.

See also, this StackOverflow post.



来源:https://stackoverflow.com/questions/22309809/dont-show-cellular-data-warning-on-ios

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!