Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't this iOS app access the network?

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).

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:

<Error>: Could not successfully update network info during initialization.

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.

The device is iOS 6 and the base sdk is iOS 5.

like image 940
Dave Avatar asked Jun 07 '13 02:06

Dave


People also ask

Why does my iPhone keep saying unable to connect to network?

Try restarting your iOS or iPadOS device. Here's how to restart your iPhone, iPad, or iPod touch. Then restart your router, and cable or DSL modem. To restart your router or modem, unplug it, then plug it back in.

How do I enable local network access for apps on iPhone?

Make sure Local Network Access is enabledOn your iOS device's home screen (iOS 14 or later), tap Settings. Local Network. You'll find a list of apps. Turn on Local Network Access for the app(s) you would like to allow access to your network.

How do I allow network permissions on iPhone?

Launch the Settings app. From the Settings list, tap Privacy. Tap Local Network. The next screen will display the apps that have requested permission to find and communicate on your local network.


2 Answers

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.

like image 170
rockdaswift Avatar answered Oct 03 '22 07:10

rockdaswift


Check the developer tools to check if you have accidentally turned on 100% loss internet. It should be in the debug menu.

like image 28
Schemetrical Avatar answered Oct 03 '22 05:10

Schemetrical