newrelic-react-native-agent
Version:
A New Relic Mobile Agent for React Native
22 lines (20 loc) • 812 B
JavaScript
/**
* Copyright (c) 2022-present New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.withNetworkAcessPermission = void 0;
const config_plugins_1 = require("@expo/config-plugins");
const constants_1 = require("./constants");
/**
* Update `app/build.gradle` by applying newrelic plugin
*/
const withNetworkAcessPermission = config => {
return (0, config_plugins_1.withAndroidManifest)(config, async (config) => {
let androidManifest = config.modResults;
config_plugins_1.AndroidConfig.Permissions.addPermission(androidManifest, constants_1.networkAcessStatePermission);
return config;
});
};
exports.withNetworkAcessPermission = withNetworkAcessPermission;