From the course: Apple watchOS App Development: Advanced APIs

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

How devices communicate

How devices communicate

From the course: Apple watchOS App Development: Advanced APIs

Start my 1-month free trial

How devices communicate

- [Instructor] You've learned how you can schedule background tasks on your Apple Watch. The Apple Watch can communicate with your paired iPhone and external servers to get data for apps running on the watch. Many of these do use background tasks to get the job done for reasons that should be clear by now. Every time users drop their wrist there's a chance the app will be in the background. Two minutes later, it definitely will be once out of the frontmost app state. That wreaks havoc if communication is only available in the active state. WatchOS communicates with the outside world using the watch connectivity framework either in the foreground or in the background. You'll need to do a few steps. First see what devices exist and if it is available for use. Second send your payload to the device. And thirdly move the payload to where it is useful in the app since it is in very temporary memory. Let's look at these in more concrete examples using an already existing iPhone app as a…

Contents