Skip to content

@capgo/capacitor-watch

Apple Watch and Wear OS communication for Capacitor. Bidirectional messaging, phone to watch replies, and getReceivedState() for the last application context from the watch.

@capgo/capacitor-watch connects your Capacitor phone app to a companion watch app:

  • iOS: WatchConnectivity with a watchOS target and optional CapgoWatchSDK.
  • Android: Wear OS Data Layer (play-services-wearable) with a Wear OS module in the same Android project.
  • Web: not supported for watch messaging; getInfo() and getPluginVersion() resolve with safe defaults; messaging methods reject; listeners register but never deliver events

Capabilities below match the native implementations in CapgoWatchPlugin.swift and CapgoWatchPlugin.java.

CapabilityiOS (Apple Watch)Android (Wear OS)Web
sendMessageYes. Requires activated session and isReachable. expectsReply: true waits for a watch reply.Yes. Sends on /capgo/message, or /capgo/message/withreply when expectsReply is true. Rejects if no Wear OS node is connected.No
updateApplicationContextYes. Latest value only via WatchConnectivity.Yes. DataItem at /capgo/context with JSON in payload.No
transferUserInfoYes. Queued user-info transfer.Yes. DataItem at /capgo/userinfo/{uuid} with JSON in payload.No
replyToMessageYes. After messageReceivedWithReply.Yes. Sends on /capgo/reply/{callbackId} to the watch node (5 minute pending TTL).No
getReceivedStateYes. Last receivedApplicationContext.Yes. Last persisted application context DataItem.Resolves { context: null }
getInfoYes. WatchConnectivity pairing and reachability.Yes. Connected nodes plus capgo_watch capability for watch app install detection.Returns isSupported: false
getPluginVersionYesYesReturns { version: "web" }
messageReceivedYesYes. Incoming /capgo/message.Registers only; no events on web
messageReceivedWithReplyYesYes. Incoming /capgo/message/withreply.Registers only; no events on web
applicationContextReceivedYesYes. Incoming /capgo/context DataItem.Registers only; no events on web
userInfoReceivedYesYes. Incoming /capgo/userinfo/* (phone deletes item after delivery).Registers only; no events on web
reachabilityChangedYesYes. Emitted when connected Wear OS nodes change. Persisted and replayed if no JS listener is registered.Registers only; no events on web
activationStateChangedYesNot emitted on AndroidRegisters only; no events on web
  • sendMessage - Send an interactive message to the watch. The watch must be reachable for this to succeed. Use this for time-sensitive, interactive communication. Pass expectsReply: true to wait for a watch reply.
  • updateApplicationContext - Update the application context shared with the watch. Only the latest context is kept - this overwrites any previous context. Use this for syncing app state that the watch needs to display.
  • transferUserInfo - Transfer user info to the watch. Transfers are queued and delivered in order, even if the watch is not currently reachable. Use this for important data that must be delivered reliably.
  • replyToMessage - Reply to a message from the watch that requested a reply. Use this in response to the messageReceivedWithReply event.
  • getReceivedState - Return the last application context received from the watch.
MethodDescription
sendMessageSend an interactive message to the watch. The watch must be reachable for this to succeed. Use this for time-sensitive, interactive communication. With expectsReply: true, waits for a watch reply.
updateApplicationContextUpdate the application context shared with the watch. Only the latest context is kept - this overwrites any previous context. Use this for syncing app state that the watch needs to display.
transferUserInfoTransfer user info to the watch. Transfers are queued and delivered in order, even if the watch is not currently reachable. Use this for important data that must be delivered reliably.
replyToMessageReply to a message from the watch that requested a reply. Use this in response to the messageReceivedWithReply event.
getReceivedStateReturn the last application context received from the watch.
getInfoGet information about the watch connectivity status.
getPluginVersionGet the native Capacitor plugin version.
addListenerListen for messages received from the watch.
addListenerListen for messages from the watch that require a reply.
addListenerListen for application context updates from the watch.
addListenerListen for user info transfers from the watch.
addListenerListen for watch reachability changes (iOS and Android).
addListenerListen for session activation state changes (iOS only).
removeAllListenersRemove all listeners for this plugin.

This reference is synced from src/definitions.ts in capacitor-watch.

If you are using @capgo/capacitor-watch to plan migration and enterprise operations, connect it with Using @capgo/capacitor-watch for the native capability in Using @capgo/capacitor-watch, Capgo Enterprise for the product workflow in Capgo Enterprise, Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives, Capgo Alternatives for the product workflow in Capgo Alternatives, and Capgo Consulting for the product workflow in Capgo Consulting.