UNPKG

@haykmkrtich/react-native-patriot-native

Version:

[![npm version](https://badge.fury.io/js/%40haykmkrtich%2Freact-native-patriot-native.svg)](https://badge.fury.io/js/%40haykmkrtich%2Freact-native-patriot-native) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.o

17 lines (11 loc) 589 B
import { NativeModules } from 'react-native'; type PatriotNativeType = { installWatchface(packageName: string): Promise<void>; getConnectedWatchProperties(): Promise<{ id: string; displayName: string; isNearby: boolean; type: string; platform: string }>; }; const { PatriotNative } = NativeModules as { PatriotNative: PatriotNativeType }; if (!PatriotNative) { throw new Error('PatriotNative module is not linked properly.'); } export const installWatchface = PatriotNative.installWatchface; export const getConnectedWatchProperties = PatriotNative.getConnectedWatchProperties;