JackieNBee
JackieNBee

Reputation: 203

Is it possible for an Apple Watch to get data directly from a Web Server without having an iPhone as an intermediary?

I'm creating an app that wants to get a JSON file (or any data) from a local web server (MAMP) without having an iPhone that communicate with the server, parse the file and eventually sends the data to the Apple Watch via WatchConnectivity.

Is it possible? Is there any API I could use?

I've seen that the apps preinstalled on the watch can get data from the Web even with the iPhone turned off relaying only on the Wifi connectivity: for example the Apple's map app.

Thank you!

Upvotes: 2

Views: 2427

Answers (1)

Paulw11
Paulw11

Reputation: 114773

Yes. As long as the watch has a network connection, via WiFi, cellular or through Bluetooth to its paired phone then you can use networking features, such as URLSession to fetch web content.

Even if the watch does piggyback off the phone's network connection, it doesn't require you to send data "through" the companion app.

As of watchOS 6.0, watch apps don't need a phone companion app; they can be stand-alone.

Upvotes: 2

Related Questions