How to use the react-native-watch-connectivity.getIsWatchAppInstalled function in react-native-watch-connectivity

To help you get started, we’ve selected a few react-native-watch-connectivity examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BlueWallet / BlueWallet / WatchConnectivity.ios.js View on Github external
getIsWatchAppInstalled() {
    Watch.getIsWatchAppInstalled((err, isAppInstalled) => {
      if (!err) {
        WatchConnectivity.shared.isAppInstalled = isAppInstalled;
        Watch.subscribeToWatchState((err, watchState) => {
          if (!err) {
            if (watchState === 'Activated') {
              WatchConnectivity.shared.sendWalletsToWatch();
            }
          }
        });
        Watch.subscribeToMessages(async (err, message, reply) => {
          if (!err) {
            if (message.request === 'createInvoice') {
              const createInvoiceRequest = await this.handleLightningInvoiceCreateRequest(
                message.walletIndex,
                message.amount,
                message.description,