Files
SwimBuddy/src/modules/watch-connectivity/index.ts
T

19 lines
753 B
TypeScript

import { requireOptionalNativeModule } from "expo-modules-core";
let WatchConnectivity: any;
WatchConnectivity = requireOptionalNativeModule("WatchConnectivity") ?? {
isSupported: async () => false,
isPaired: async () => false,
isWatchAppInstalled: async () => false,
isReachable: async () => false,
sendWorkoutPlan: async () => ({ error: "WatchConnectivity native module not available" }),
sendWorkoutCompletion: async () => ({ error: "WatchConnectivity native module not available" }),
sendWorkoutDeleted: async () => ({ error: "WatchConnectivity native module not available" }),
pollEvents: async () => [],
getApplicationContext: async () => null,
updateApplicationContext: async () => {},
};
export default WatchConnectivity;