fix: resolve import paths and module loading errors
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
import { requireNativeModule } from "expo-modules-core";
|
||||
import { requireOptionalNativeModule } from "expo-modules-core";
|
||||
|
||||
export default requireNativeModule("WatchConnectivity");
|
||||
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" }),
|
||||
getApplicationContext: async () => null,
|
||||
updateApplicationContext: async () => {},
|
||||
};
|
||||
|
||||
export default WatchConnectivity;
|
||||
|
||||
Reference in New Issue
Block a user