UNPKG

react-native-integrate

Version:

Automate integration of additional code into React Native projects

23 lines (22 loc) 1.03 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getIosBundleId = getIosBundleId; const xcode_1 = __importDefault(require("xcode")); const constants_1 = require("../constants"); const xcodeTask_helpers_1 = require("../tasks/xcode/xcodeTask.helpers"); const getIosProjectPath_1 = require("./getIosProjectPath"); function getIosBundleId() { const pbxFilePath = (0, getIosProjectPath_1.getPbxProjectPath)(); const proj = xcode_1.default.project(pbxFilePath); proj.parseSync(); const nativeTarget = proj.getTarget(constants_1.Constants.XCODE_APPLICATION_TYPE); let bundleId = proj.getBuildProperty('PRODUCT_BUNDLE_IDENTIFIER', 'Release', nativeTarget.target.name); if (bundleId) bundleId = (0, xcodeTask_helpers_1.normalizeBundleId)(bundleId, { productName: nativeTarget.target.name, }); return bundleId; }