为什么这个iOS应用程序无法访问网络? [英] Why can't this iOS app access the network?
问题描述
我的(Unity)应用程序抱怨我的iPod没有网络连接,而设备具有完整的Wi-Fi连接(所有其他应用程序,包括Safari)都证明了这一点。
My (Unity) app complains that the my iPod does not have network connectivity while the device has full wi-fi connectivity (as evidenced by every other app, including Safari).
这不仅仅是一个API点 - 所有这些(Facebook,StoreKit等)声称网络不可用。
This isn't just one API point - all of them (Facebook, StoreKit, etc) claim that the network is not available.
此消息定期从我的应用程序发送到控制台:
This message is periodically sent to the console from my app:
<错误>:初始化期间无法成功更新网络信息。
可能(我认为)来自 CoreTelephony 。
which may (I think) be coming from CoreTelephony.
知道造成这种情况的原因是什么吗?我在调试和adhoc构建中得到它。我没有在设备上激活任何限制(来自设置)。
Any idea what is causing this? I get it in debug and adhoc builds. I do not have any Restrictions (from Settings) active on the device.
该设备为iOS 6,基本sdk为iOS 5.
The device is iOS 6 and the base sdk is iOS 5.
推荐答案
初始化期间无法成功更新网络信息。每次在没有SIM卡的设备(iPod touch或没有3G的iPad)中初始化CTTelephonyNetworkInfo时,都会显示日志。
The "Could not successfully update network info during initialization." log is shown every time you initialize the CTTelephonyNetworkInfo in a device without SIM card, (iPod touch or iPad without 3G).
如果它非常烦人,你只需初始化一次并对该实例进行网络检查。
If it's very annoying, you can just initialize it once and do your network checks against that instance.
这篇关于为什么这个iOS应用程序无法访问网络?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!