I am developing a watchOS-only app, and whenever I attempt to make a network request, it always fails and throws the following error:
Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline."
I noticed that when I turn off Wi-Fi and Bluetooth in the settings of the iPhone paired with the Apple Watch (thus disconnecting the Apple Watch from the iPhone), my app can successfully connect to the network.
Additionally, when the app contains both an iOS app and a watchOS app, after granting network permissions on the iOS app, the watchOS app can access the network normally when connected to the iPhone.
When opening some system apps on the Apple Watch (such as the "Workout" app), the app will display a network permission request similar to that on iOS, but this request does not automatically pop up when my watchOS app attempts to access the network.
Is there a way to request network permissions in a watchOS-only app so that it can access the network while connected to the iPhone?
Howdy! Can you please file Feedback with sysdiagnose logs attached? If you are running the watchOS 11 beta, the appropriate logs should be recorded when you initiate a sysdiagnose. If you are running watchOS 10 or earlier, you'll need to install the sysdiagnose profile first (you can find profiles & instructions for getting logs here: https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=watchos). It does sound like there's something missing here, and I'd love to investigate. Thank you!