Skip to content

Commit

Permalink
feat: add support for xcode 16 arch arg in run
Browse files Browse the repository at this point in the history
  • Loading branch information
rams23 committed Oct 18, 2024
1 parent 3a26066 commit 88367ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/cli/src/application/runIos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ export async function runApp(
iosPlatform: IosPlatform = iosBuildPlatforms.simulator,
forceBuild?: boolean,
buildId?: string,
destinationPlatformEnrichment?:string
destinationPlatformEnrichment?:string,
arch?:string
) {
const buildFlavor = getIosFlavors(buildType);

Expand All @@ -186,7 +187,7 @@ export async function runApp(
if (buildId) {
throw new Error(`The requested build id ${buildId} does not contain an ios build for scheme ${buildFlavor}`);
}
buildIos(buildType,config, iosPlatform, destinationPlatformEnrichment);
buildIos(buildType,config, iosPlatform, destinationPlatformEnrichment, arch);
} else {
logger.info('Build already present, skipping build');
}
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default class Run extends MaybeRemoteAwareCommand {
config: Flags.string({ char: 'c', description: 'Specify the config to build' }),
destination: Flags.string({ char: 'd', description: 'Append this to the standard destination platform, like arch=x86_64 for rosetta emulator' }),
verbose: Flags.boolean({ description: 'Verbose output' }),
arch: Flags.string({ char: 'A', description: 'Specify the architecture to build' }),
iosPlatform: Flags.string({
description: 'Specify the ios platform to run on',
options: ['simulator', 'device'],
Expand Down Expand Up @@ -46,6 +47,7 @@ export default class Run extends MaybeRemoteAwareCommand {
const forceBuild = flags.forceBuild;
let buildId = flags.buildId;
let destination = flags.destination;
let arch = flags.arch
let iosPlatform = flags.iosPlatform === 'simulator' ? iosBuildPlatforms.simulator : iosBuildPlatforms.iphone;

logger.setVerbose(flags.verbose);
Expand Down Expand Up @@ -79,7 +81,7 @@ export default class Run extends MaybeRemoteAwareCommand {
}
if (shouldRunIos) {
logger.info(`Running ios app ${buildFlavor ? `with flavor ${buildFlavor}` : ''}`);
await runIos(buildFlavor!,config, iosPlatform, forceBuild, buildId, destination);
await runIos(buildFlavor!,config, iosPlatform, forceBuild, buildId, destination, arch);
}
logger.info(`Run finished in ${((performance.now() - start) / 1000).toFixed(1)} seconds`);
this.exit(0);
Expand Down

0 comments on commit 88367ac

Please sign in to comment.