4

when I launch my app normally with 3g/wifi on, I get no error within the console. When I disable data access (aka airplane mode) for testing purposes, I get the following error message when the app launches within 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

May it be noted that I get a uialertview that pops up when the app detects no data connection and that I am using a tab bar controller. I have no idea why I am getting these error messages.

Thanks in advance!

Teddy13
  • 3,824
  • 11
  • 42
  • 69

1 Answers1

11

Those are not error message per-say, but rather notification messages letting you know that there is no network connection. To disable them you can open up 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" line.

Reachability.m source
Reachability.h source

chown
  • 51,908
  • 16
  • 134
  • 170
  • Thank you for the quick reply chown, however I cannot find this line of code within my Reachability.h file. So I decided to add #define kShouldPrintReachabilityFlags 0 under #import. No luck, same deal. – Teddy13 Nov 17 '11 at 03:04
  • Its in the .m file, Reachability.m – chown Nov 17 '11 at 03:20
  • Thank you chown! It got rid of my reachability issue but do you by any chance know why I am still getting 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? – Teddy13 Nov 17 '11 at 06:40
  • Thats most likely because your app delegate didFinishLaunching method doesnt add a view controller to self.view before returning. – chown Nov 17 '11 at 06:50
  • so what code should I add within didFinishLaunching? Thanks again – Teddy13 Nov 18 '11 at 03:22
  • @marcus13 If you can post the code for your method (in a new question) I can probably tell you what is wrong with it and what needs to be fixed/added/etc. Just put the link to the new question in a comment here and I can help you with it. (A seperate question will make it a lot easier for people with this same problem to find a solution in the future.) – chown Nov 18 '11 at 03:33
  • Good point. Thanks for the advice. Here is the link http://stackoverflow.com/questions/8190567/applications-expected-to-have-a-root-view-controller-console – Teddy13 Nov 18 '11 at 23:48
  • Sorry to be annoying and repetitive with questions but you seem to have a very good understanding of app development. I have one final error in the console and I will be able to submit my app (finally). Here is the link to my question, I have searched it up but no luck with any of the solutions? thanks http://stackoverflow.com/questions/8190989/wait-fences-failed-to-receive-reply-10004003-error-still-appearing – Teddy13 Nov 19 '11 at 00:48