Firstly, we define a typealias
for the data structure added to both the watch and the phone targets, that will hold the location data, by following these steps:
In the downloaded project, create a new Swift file, name it SharedConstants.swift
, being sure to select both targets, Plot Buddy and Plot Buddy WatchKit Extension, as illustrated here:

Select this file in the project navigator and replace the import
statement with the following code:
Import WatchKit typealias LocationSet = [CLLocation] //1 let ApplicationContextDataKey = "Data" //2