UNPKG

@b8safe/react-native-safe

Version:
24 lines (23 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.withAuthentication = void 0; const config_plugins_1 = require("@expo/config-plugins"); /** * Set the `enableLocation` flag inside of the XcodeProject. * This is used to enable location APIs. * If location is disabled, the CLLocation APIs are not used in the codebase. * This is useful if you don't use Location and apple review is unhappy about CLLocation usage. */ const withAuthentication = (config, hashChecker) => { config = (0, config_plugins_1.withInfoPlist)(config, (configInfoPlist) => { configInfoPlist.modResults.B8SAFE_HASH_CHECKER = hashChecker; return configInfoPlist; }); config = (0, config_plugins_1.withAndroidManifest)(config, (configAndroidManifest) => { const mainApplication = config_plugins_1.AndroidConfig.Manifest.getMainApplicationOrThrow(configAndroidManifest.modResults); config_plugins_1.AndroidConfig.Manifest.addMetaDataItemToMainApplication(mainApplication, 'B8SAFE_HASH_CHECKER', hashChecker); return configAndroidManifest; }); return config; }; exports.withAuthentication = withAuthentication;