为什么这个iOS应用无法访问网络? [英] Why can't this iOS app access the network?

查看:47
本文介绍了为什么这个iOS应用无法访问网络?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 (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.

知道是什么原因造成的吗?我在调试和临时构建中得到它.我在设备上没有任何限制(来自设置).

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 卡的设备(没有 3G 的 iPod touch 或 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屋!

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