From 91f3f220dddc4f17b3422a9a0be46fcd3666b8c0 Mon Sep 17 00:00:00 2001 From: lvwang2002 Date: Sun, 24 Mar 2024 23:50:32 +0800 Subject: [PATCH] =?UTF-8?q?feature():=E5=8E=BB=E6=8E=89=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.tsx | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 45be232..33b987f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,30 +1,4 @@ -import { NativeModules, Platform } from 'react-native'; - -const LINKING_ERROR = - `The package 'react-native-bt-device' doesn't seem to be linked. Make sure: \n\n` + - Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) + - '- You rebuilt the app after installing the package\n' + - '- You are not using Expo Go\n'; - -const BtDevice = NativeModules.BtDevice - ? NativeModules.BtDevice - : new Proxy( - {}, - { - get() { - throw new Error(LINKING_ERROR); - }, - } - ); +import { NativeModules } from 'react-native'; const RNMethodModule = NativeModules.RNMethodModule export default RNMethodModule; - - -// export function multiply(a: number, b: number): Promise { -// return BtDevice.multiply(a, b); -// } - -// export function startBLEScan(){ -// RNMethodModule.startBLEScan(); -// }