@capgo/capacitor-watch
Apple Watch communication plugin for Capacitor. Provides bidirectional messaging between iPhone and Apple Watch using WatchConnectivity.
Overview
Section titled “Overview”Apple Watch communication plugin for Capacitor. Provides bidirectional messaging between iPhone and Apple Watch using WatchConnectivity.
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.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.
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. |
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. |
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. |
addListener | Listen for session activation state changes. |
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.