I’ve set up a UILabel, which gets its content from parse.com. All worked fine, until I enabled fly mode. At the view which loads the label I get very long loading time and the console gives me that code:
2012-11-08 21:07:41.179 My App[5275:907] Warning: A long-running Parse operation is being executed on the main thread.
Break on warnParseOperationOnMainThread() to debug.
2012-11-08 21:07:41.231 My App[5275:907] Error: Error Domain=NSURLErrorDomain Code=-1009 "Es besteht anscheinend keine Verbindung zum Internet." UserInfo=0x1e5c2f00 {NSErrorFailingURLStringKey=https://api.parse.com/2/find, NSErrorFailingURLKey=https://api.parse.com/2/find, NSLocalizedDescription=Es besteht anscheinend keine Verbindung zum Internet., NSUnderlyingError=0x1e5c1d70 "Es besteht anscheinend keine Verbindung zum Internet."} (Code: 100, Version: 1.1.14)
2012-11-08 21:07:41.232 My App[5275:907] Network connection failed. Making attempt 2 after sleeping for 1.287663 seconds.
2012-11-08 21:07:42.582 My App[5275:907] Error: Error Domain=NSURLErrorDomain Code=-1009 "Es besteht anscheinend keine Verbindung zum Internet." UserInfo=0x1e5c6f00 {NSErrorFailingURLStringKey=https://api.parse.com/2/find, NSErrorFailingURLKey=https://api.parse.com/2/find, NSLocalizedDescription=Es besteht anscheinend keine Verbindung zum Internet., NSUnderlyingError=0x1e5c6f40 "Es besteht anscheinend keine Verbindung zum Internet."} (Code: 100, Version: 1.1.14)
2012-11-08 21:07:42.583 My App[5275:907] Network connection failed. Making attempt 3 after sleeping for 2.575326 seconds.
2012-11-08 21:07:45.215 My App[5275:907] Error: Error Domain=NSURLErrorDomain Code=-1009 "Es besteht anscheinend keine Verbindung zum Internet." UserInfo=0x1f88bd90 {NSErrorFailingURLStringKey=https://api.parse.com/2/find, NSErrorFailingURLKey=https://api.parse.com/2/find, NSLocalizedDescription=Es besteht anscheinend keine Verbindung zum Internet., NSUnderlyingError=0x1f88c840 "Es besteht anscheinend keine Verbindung zum Internet."} (Code: 100, Version: 1.1.14)
2012-11-08 21:07:45.216 My App[5275:907] Network connection failed. Making attempt 4 after sleeping for 5.150652 seconds.
2012-11-08 21:07:50.383 My App[5275:907] Error: Error Domain=NSURLErrorDomain Code=-1009 "Es besteht anscheinend keine Verbindung zum Internet." UserInfo=0x1f88c310 {NSErrorFailingURLStringKey=https://api.parse.com/2/find, NSErrorFailingURLKey=https://api.parse.com/2/find, NSLocalizedDescription=Es besteht anscheinend keine Verbindung zum Internet., NSUnderlyingError=0x1f88b4a0 "Es besteht anscheinend keine Verbindung zum Internet."} (Code: 100, Version: 1.1.14)
2012-11-08 21:07:50.384 My App[5275:907] Network connection failed. Making attempt 5 after sleeping for 10.301305 seconds.
2012-11-08 21:08:00.743 My App[5275:907] Error: Error Domain=NSURLErrorDomain Code=-1009 "Es besteht anscheinend keine Verbindung zum Internet." UserInfo=0x1e5c8160 {NSErrorFailingURLStringKey=https://api.parse.com/2/find, NSErrorFailingURLKey=https://api.parse.com/2/find, NSLocalizedDescription=Es besteht anscheinend keine Verbindung zum Internet., NSUnderlyingError=0x1f88e450 "Es besteht anscheinend keine Verbindung zum Internet."} (Code: 100, Version: 1.1.14)
“Es besteht anscheinend keine Verbindung zum Internet” means that theres no connection to the internet.
Is there a way to solve this?
Thanks
Don’t do networking on the main thread – ever 🙂
dispatch_async a block and only set the label’s text on the main thread.