Skip to content

Commit ef7a66a

Browse files
committed
fix: install pods on ios commands with new arch
1 parent 9bd6a64 commit ef7a66a

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

packages/cli-platform-ios/src/commands/runIOS/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {promptForDeviceSelection} from '../../tools/prompts';
3131
import getSimulators from '../../tools/getSimulators';
3232
import {getXcodeProjectAndDir} from '../buildIOS/getXcodeProjectAndDir';
3333
import resolvePods from '../../tools/pods';
34+
import getArchitecture from '../../tools/getArchitecture';
3435

3536
export interface FlagsT extends BuildFlags {
3637
simulator?: string;
@@ -48,8 +49,15 @@ async function runIOS(_: Array<string>, ctx: Config, args: FlagsT) {
4849

4950
let {packager, port} = args;
5051

52+
const isAppRunningNewArchitecture = ctx.project.ios?.sourceDir
53+
? await getArchitecture(ctx.project.ios?.sourceDir)
54+
: undefined;
55+
5156
// check if pods need to be installed
52-
await resolvePods(ctx.root, ctx.dependencies, {forceInstall: args.forcePods});
57+
await resolvePods(ctx.root, ctx.dependencies, {
58+
forceInstall: args.forcePods,
59+
newArchEnabled: isAppRunningNewArchitecture,
60+
});
5361

5462
const packagerStatus = await isPackagerRunning(port);
5563

packages/cli-platform-ios/src/tools/installPods.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ async function runPodInstall(loader: Ora, options?: RunPodInstallOptions) {
2525
const shouldHandleRepoUpdate = options?.shouldHandleRepoUpdate || true;
2626
try {
2727
loader.start(
28-
`Installing CocoaPods dependencies ${chalk.dim(
29-
'(this may take a few minutes)',
30-
)}`,
28+
`Installing CocoaPods dependencies ${chalk.bold(
29+
options?.newArchEnabled ? 'with New Architecture' : '',
30+
)} ${chalk.dim('(this may take a few minutes)')}`,
3131
);
3232

3333
await execa('bundle', ['exec', 'pod', 'install'], {

0 commit comments

Comments
 (0)