NSURLErrorNotConnectedToInternet after updating to Watch OS 9.0

After updating to Watch OS 9 our app suddenly cannot connect to the internet with my app using a NSURLSession. It gets an error NSURLErrorNotConnectedToInternet every time. But this still works fine on Watch OS 8.

I'm definitely connected to the Internet over WIFI on my Watch and iPhone. It still works fine in the simulator but not on my Watch. Are there any new requirements in Watch OS 9 to get internet access, such as request permission from the user or adding anything to info.plist?

Thanks

What sort of task are you running in your session? Something that runs an HTTP[S] request, like a data task (NSURLSessionDataTask)? Or something more low-level, like a stream task (NSURLSessionStreamTask) or WebSocket task (NSURLSessionWebSocketTask)?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I do both, but for testing purposes I am just running this:

NSString* results = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"https://google.com"] encoding: NSStringEncodingConversionAllowLossy error: nil];

NSLog(@"Content: %@", results);

It works in the simulator and in OS 8, but not on my physical watch. Is there anything I need to add to my .plist file like I do for iOS?

Thanks

I have the same problem with Web Socket. We discuss this issue here ( https://github.com/firebase/firebase-ios-sdk/issues/10195 ) as well

Thanks. Doesn't look like there has been any resolution yet? Do we think this is a bug or Apple removed this functionality? Mine is also failing just loading regular URLs, not even using WebSockets

For those reading along at home, I’ll be helping coderkid in a different context.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

NSURLErrorNotConnectedToInternet after updating to Watch OS 9.0
 
 
Q