Overview
Section titled “Overview”@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()andgetPluginVersion()resolve with safe defaults; messaging methods reject; listeners register but never deliver events
Platform support
Section titled “Platform support”Capabilities below match the native implementations in CapgoWatchPlugin.swift and CapgoWatchPlugin.java.
| Capability | iOS (Apple Watch) | Android (Wear OS) | Web |
|---|---|---|---|
sendMessage | Yes. 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 |
updateApplicationContext | Yes. Latest value only via WatchConnectivity. | Yes. DataItem at /capgo/context with JSON in payload. | No |
transferUserInfo | Yes. Queued user-info transfer. | Yes. DataItem at /capgo/userinfo/{uuid} with JSON in payload. | No |
replyToMessage | Yes. After messageReceivedWithReply. | Yes. Sends on /capgo/reply/{callbackId} to the watch node (5 minute pending TTL). | No |
getReceivedState | Yes. Last receivedApplicationContext. | Yes. Last persisted application context DataItem. | Resolves { context: null } |
getInfo | Yes. WatchConnectivity pairing and reachability. | Yes. Connected nodes plus capgo_watch capability for watch app install detection. | Returns isSupported: false |
getPluginVersion | Yes | Yes | Returns { version: "web" } |
messageReceived | Yes | Yes. Incoming /capgo/message. | Registers only; no events on web |
messageReceivedWithReply | Yes | Yes. Incoming /capgo/message/withreply. | Registers only; no events on web |
applicationContextReceived | Yes | Yes. Incoming /capgo/context DataItem. | Registers only; no events on web |
userInfoReceived | Yes | Yes. Incoming /capgo/userinfo/* (phone deletes item after delivery). | Registers only; no events on web |
reachabilityChanged | Yes | Yes. Emitted when connected Wear OS nodes change. Persisted and replayed if no JS listener is registered. | Registers only; no events on web |
activationStateChanged | Yes | Not emitted on Android | Registers only; no events on web |
Setup guides
Section titled “Setup guides”- Creating a watchOS app (Apple Watch + CapgoWatchSDK)
- Creating a Wear OS app (official Kotlin SDK in
watch-sdk/wearos, or a manual Data Layer module)
Core Capabilities
Section titled “Core Capabilities”sendMessage- Send an interactive message to the watch. The watch must be reachable for this to succeed. Use this for time-sensitive, interactive communication. PassexpectsReply: trueto 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.
Public API
Section titled “Public API”| Method | Description |
|---|---|
sendMessage | Send 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. |
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. |
getInfo | Get information about the watch connectivity status. |
getPluginVersion | Get the native Capacitor plugin version. |
addListener | Listen for messages received from the watch. |
addListener | Listen for messages from the watch that require a reply. |
addListener | Listen for application context updates from the watch. |
addListener | Listen for user info transfers from the watch. |
addListener | Listen for watch reachability changes (iOS and Android). |
addListener | Listen for session activation state changes (iOS only). |
removeAllListeners | Remove all listeners for this plugin. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-watch.
Keep going from @capgo/capacitor-watch
Section titled “Keep going from @capgo/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.