UNPKG

smartech-base-expo-plugin

Version:

Smartech Base Expo SDK's React Native Plugin For React Native Projects.

37 lines (36 loc) 1.63 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateSmartechProps = void 0; const TAG = "SmartechBaseExpoPlugin"; const validateSmartechProps = (props) => { // iOS if (typeof props.ios.appId === 'undefined') { throw new Error(`${TAG} iOS config property appId is required.`); } if (typeof props.ios.groupIdentifier === 'undefined') { throw new Error(`${TAG} iOS config property groupIdentifier is required.`); } if (typeof props.ios.autoFetchLocation === 'undefined') { throw new Error(`${TAG} iOS config property autoFetchLocation is required.`); } if (typeof props.ios.useAdvID === 'undefined') { throw new Error(`${TAG} iOS config property useAdvID is required.`); } if (typeof props.ios.isLogEnabled === 'undefined') { throw new Error(`${TAG} iOS config property areLogsEnabled is required.`); } // Android if (!Array.isArray(props.android.smartechMetaData)) { throw new Error(`${TAG} Android config property smartechMetaData is required.`); } if (typeof props.android.SMARTECH_BASE_SDK_VERSION === 'undefined') { throw new Error(`${TAG} Android config property SMARTECH_BASE_SDK_VERSION is required.`); } if (typeof props.android.isKotlinProject === 'undefined') { throw new Error(`${TAG} Android config property isKotlin is required.`); } if (typeof props.android.isLogEnabled === 'undefined') { throw new Error(`${TAG} Android config property areLogsEnabled is required.`); } }; exports.validateSmartechProps = validateSmartechProps;