@haykmkrtich/react-native-patriot-native
Version:
[](https://badge.fury.io/js/%40haykmkrtich%2Freact-native-patriot-native) [](https://opensource.o
17 lines (11 loc) • 589 B
text/typescript
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;