@b8safe/react-native-safe
Version:
Package for native integration of B8Safe SDK
22 lines (21 loc) • 899 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.withLocationEnabled = void 0;
const config_plugins_1 = require("@expo/config-plugins");
const writeToPodfile_1 = require("./writeToPodfile");
/**
* 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 withLocationEnabled = (config, { enableLocation }) => {
return (0, config_plugins_1.withDangerousMod)(config, [
'ios',
(_config) => {
(0, writeToPodfile_1.writeToPodfile)(_config.modRequest.projectRoot, '$VCEnableLocation', String(enableLocation));
return _config;
},
]);
};
exports.withLocationEnabled = withLocationEnabled;