{"version":3,"names":["buildIOS","_","ctx","args","xcodeProject","sourceDir","getXcodeProjectAndDir","project","ios","automaticPodsInstallation","forcePods","isAppRunningNewArchitecture","getArchitecture","undefined","resolvePods","root","dependencies","forceInstall","newArchEnabled","process","chdir","scheme","mode","getConfiguration","buildProject","name","description","func","examples","desc","cmd","options","buildOptions"],"sources":["../../../src/commands/buildIOS/index.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {Config} from '@react-native-community/cli-types';\nimport {buildProject} from './buildProject';\nimport {BuildFlags, buildOptions} from './buildOptions';\nimport {getConfiguration} from './getConfiguration';\nimport {getXcodeProjectAndDir} from './getXcodeProjectAndDir';\nimport resolvePods from '../../tools/pods';\nimport getArchitecture from '../../tools/getArchitecture';\n\nasync function buildIOS(_: Array, ctx: Config, args: BuildFlags) {\n const {xcodeProject, sourceDir} = getXcodeProjectAndDir(ctx.project.ios);\n\n if (ctx.project.ios?.automaticPodsInstallation || args.forcePods) {\n const isAppRunningNewArchitecture = ctx.project.ios?.sourceDir\n ? await getArchitecture(ctx.project.ios?.sourceDir)\n : undefined;\n\n await resolvePods(ctx.root, ctx.dependencies, {\n forceInstall: args.forcePods,\n newArchEnabled: isAppRunningNewArchitecture,\n });\n }\n\n process.chdir(sourceDir);\n\n const {scheme, mode} = await getConfiguration(xcodeProject, sourceDir, args);\n\n return buildProject(xcodeProject, undefined, mode, scheme, args);\n}\n\nexport default {\n name: 'build-ios',\n description: 'builds your app for iOS platform',\n func: buildIOS,\n examples: [\n {\n desc: 'Build the app for all iOS devices in Release mode',\n cmd: 'npx react-native build-ios --mode \"Release\"',\n },\n ],\n options: buildOptions,\n};\n"],"mappings":";;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AAA0D;AAd1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,eAAeA,QAAQ,CAACC,CAAgB,EAAEC,GAAW,E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