Skip to content
CARP Docs
Ask AISystemLightDark
On this page

Add the watch target

Create the watchOS app target, set its identifiers and signing, and link the AWARE framework.

Copy MarkdownOpen inOpen in GitHubView as MarkdownOpen in Scira AIOpen in ChatGPTOpen in ClaudeOpen in Cursor

If your app uses any CocoaPods plugins, open the workspace, not the project:

open ios/Runner.xcworkspace

Create the watchOS app target

  1. Add a new target

    Choose File → New → Target…, then select the watchOS tab → App → Next.

  2. Fill in the target options

    FieldValue
    Product NameCarpWatch (any name works, this guide uses CarpWatch)
    InterfaceSwiftUI
    LanguageSwift
    ProjectRunner
    Embed in Companion ApplicationRunner
  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 a scheme of the same name;
  • an Embed Watch Content build phase on the Runner target.

Set the bundle identifiers and signing

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

TargetBundle identifier
Runnerdk.carp.myapp
CarpWatch Watch Appdk.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;
  • in the build setting INFOPLIST_KEY_WKCompanionAppBundleIdentifier on the watch target, which must point 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.

Warning

If this relationship is wrong, watchOS never offers to install the companion app.

The AWARE framework ships inside carp_aware_package as pre-compiled binaries. Xcode already resolved them along with the plugin, so you only need to link 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 +, pick carp-aware-watch from the list of package products, and choose Add.

  3. Leave it on Do Not Embed

    The binaries are static libraries and require no embedding or signing.

This gives the watch target two AWARE watch modules, com_awareframework_ios_sensor_applewatch_shared and com_awareframework_ios_sensor_applewatch_watchOS, including the other packages they require.

Watch target only

Do not add carp-aware-watch to the Runner target. The iOS side of the plugin already links its own AWARE binaries through carp-aware-package. Adding the watch product to the app as well gives you two copies of the same modules and duplicate-symbol errors at link time.

Next step

Capabilities and permissions

Capabilities, background modes, and the privacy strings watchOS requires.

Quick links

Page · DocumentationCARP DocumentationPage · DocumentationIntroductionPage · DocumentationQuickstartPage · DocumentationTerminologyPage · DocumentationArchitecture