Extensions in watchOS
Although we're going to create a companion watchOS app within our current iOS project, watchOS is still an app in its own right. Apple initially took this approach as a view to eventually creating standalone apps, hence setting a base foundation for developers to build standalone watchOS apps going forward.
The app element of our companion (the WatchKit App) is just like we would expect. It has its own Assets.xcassets catalog; its own settings file, info.plist; and even its own Target so that we can run it as an app. But as we'll see in the next section, no code as such lives there.
The code is created separately in an Extension folder, which is specifically generated for the watchOS project. The WatchKit App is responsible ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access