UNPKG

@react-native-kakao/core

Version:

React Native Kakao Core SDK

32 lines 1.33 kB
import { NativeModules, Platform } from 'react-native'; import { kAssert } from './util/kAssert'; import { kCreateWebError } from './util/kCreateWebError'; import { kFetch, kFetchFormUrlEncoded } from './util/kFetch'; import kGlobalStorage from './util/kGlobalStorage'; import { kRunWebAPI } from './util/kRunWebAPI'; const LINKING_ERROR = "The package '@react-native-kakao/core' 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 isTurboModuleEnabled = global.__turboModuleProxy != null; const Module = isTurboModuleEnabled ? require('./spec/NativeKakaoCore').default : NativeModules.RNCKakaoCore; const Native = Module ? Module : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); export async function initializeKakaoSDK(appKey, // eslint-disable-next-line @typescript-eslint/no-unused-vars options) { Native.initializeKakaoSDK(appKey); } export function getKeyHashAndroid() { return Native.getKeyHashAndroid(); } const KakaoCore = { initializeKakaoSDK, getKeyHashAndroid }; export default KakaoCore; export { kAssert, kCreateWebError, kGlobalStorage, kFetch, kFetchFormUrlEncoded, kRunWebAPI }; //# sourceMappingURL=index.js.map