UNPKG

@biopassid/signature-sdk-react-native

Version:
22 lines 889 B
import { NativeModules, Platform } from 'react-native'; import { mergeConfigs } from './utils/Utils'; const LINKING_ERROR = `The package '@biopassid/signature-sdk-react-native' 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 SignatureSdkReactNative = NativeModules.SignatureSdkReactNative ? NativeModules.SignatureSdkReactNative : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); export async function takeSignature(config) { try { const newConfig = mergeConfigs(config); const result = await SignatureSdkReactNative.takeSignature(newConfig); return result; } catch (error) { console.error(`Unknown error: ${error}`); return ''; } } //# sourceMappingURL=Signature.js.map