Skip to content

Add the Watch Target

Open the workspace, not the project, if your app uses any CocoaPods plugins:

Terminal window
open ios/Runner.xcworkspace
  1. File → New → Target…

    Select the watchOS tab → App → Next.

  2. Fill in the target options

    Field Value
    Product Name CarpWatch (any name works, this guide uses CarpWatch)
    Interface SwiftUI
    Language Swift
    Project Runner
    Embed in Companion Application Runner
  3. Activate the scheme

    When Xcode offers to activate the new scheme, choose Activate.

  4. Set the deployment target

    Select the CarpWatch Watch App target → General → Minimum Deployments → watchOS 8.0 or later.

Xcode creates a group CarpWatch Watch App containing CarpWatchApp.swift, ContentView.swift and assets; a target and scheme of the same name; and an Embed Watch Content build phase on the Runner target.

The watch app’s bundle identifier must be the iOS app’s identifier plus exactly one component:

Target Bundle identifier
Runner dk.carp.myapp
CarpWatch Watch App dk.carp.myapp.watchkitapp

Xcode normally gets this right when you use Embed in Companion Application. Verify it under the watch target → Signing & Capabilities → Bundle Identifier, and check that the build setting INFOPLIST_KEY_WKCompanionAppBundleIdentifier on the watch target points at the iOS bundle identifier.

Set the same Team on both targets and let Xcode manage signing. With manual signing you need a second provisioning profile for the watch app’s identifier.

Section titled “3. Link the AWARE framework into the watch target”

The AWARE framework ships inside carp_aware_package as pre-compiled binaries. Xcode already resolved them along with the plugin, so all that is left is linking them into the watch target.

  1. Select the watch target

    CarpWatch Watch App → General.

  2. Add the framework

    Under Frameworks, Libraries, and Embedded Content, press + and pick carp-aware-watch from the list of package products → Add

  3. Leave it on Do Not Embed

    The binaries are static libraries and require no embedding and signing

This results in two AWARE watch modules: com_awareframework_ios_sensor_applewatch_shared and com_awareframework_ios_sensor_applewatch_watchOS including the other packages they require.