An error in the console when the device does not have access to the Internet (data)

When I run my application, usually with 3g / wifi, I get no errors in the console. When I disable data access (for example, airplane mode) for testing, I get the following error message when the application starts in the console:

2011-11-16 19:17:40.440 Juice[8674:707] Reachability Flag Status: -- ------- networkStatusForFlags 2011-11-16 19:17:41.292 Juice[8674:707] Applications are expected to have a root view controller at the end of application launch 

You may notice that I get a uialertview that appears when the application does not detect any data connection and that I use the tab bar controller. I have no idea why I am getting these error messages.

Thanks in advance!

+4
source share
1 answer

This is not an error message, but notification messages letting you know that there is no network connection. To disable them, you can open your local copy of Reachability.m and change this:

 #define kShouldPrintReachabilityFlags 1 

To:

 #define kShouldPrintReachabilityFlags 0 

The line is just below the #import "Reachability.h" .

Reach .m source
Source Reachability.h

+11
source

Source: https://habr.com/ru/post/1381611/


All Articles