Preparing for WatchConnectivity: Persisting Data in TapALap

One of the more confusing parts of TapALap is the track selection and configuration process, which makes it an ideal candidate for the iPhone instead. The user should be able to do everything he needs before he runs on the watch, since he might install the app and leave his phone behind—for instance, in a gym locker room—but there are some things you can leave to the user’s iPhone instead: renaming tracks, editing lap distance, or deleting tracks. You’ll use the WatchConnectivity framework to synchronize your track data from watchOS to iOS and use the iPhone app for more advanced editing. Before you can get into WatchConnectivity, you’ll need to add a way to persist track data in TapALap ...

Get Developing for Apple Watch, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.