2

I would like to determine if a Series3 watch is using Cellular for data transfer or able to use WiFi/Bluetooth. SystemConfiguration is not included in WatchOS, so the standard "Reachability" approach does not seem to be an option. (I am using WatchOS 4.x) Is there an equivalent way to determine which network(s) the watch is currently connected to? (WiFi/WWAN/None)

My specific use case is a health monitoring watch application. I need to maximize battery life, so I would like to only transfer data (small amounts of JSON to a server URL every few minutes) if the watch is NOT on the cell network. (After a few hours I'll need to send the data regardless.) The watch may be "untethered" from the phone for large amounts of time (days). Knowing if the Watch is on WiFi or Cell would help me to determine if I should throttle back sending data to preserve watch battery life.

John Robi
  • 345
  • 2
  • 8
  • Even the documentation on [Testing watchOS networking](https://developer.apple.com/documentation/watchkit/keeping_your_watchos_app_s_content_up_to_date/testing_watchos_networking) only lists the possible networking routes, but doesn't include any code samples, which is weird from Apple, they usually provide sample code or full sample apps. – Dávid Pásztor Feb 28 '18 at 16:38

1 Answers1

0

I'd expect you can determine this from WatchConnectivity. Remember that Apple Watch has limited network connectivity. It basically allows you to use the URL classes for general network access, or WatchConnectivity for access to the tethered iPhone. If WatchConnectivity shows availability of the iPhone, then you know that Cellular is not being used.

You should probably expand your question to define what type of 'data transfer' you are asking about. As I describe a little in the previous paragraph, there are only limited modes of data transfer on the watch, and you must use them explicitly to transfer information. A watch app can use this knowledge to determine the present connectivity state of the watch.

Cobra
  • 369
  • 1
  • 6
  • 1
    Thanks for the feedback. I've expanded my question a bit. Have not yet experimented deeply with WatchConnectivity because in my use case the iPhone might not be nearby, but the Watch (Series 3) seems to connect to WiFi with or without a nearby iPhone. – John Robi Mar 01 '18 at 19:04