Skip to content

Commit

Permalink
Allow apple to configure Hermes as option (facebook#44461)
Browse files Browse the repository at this point in the history
Summary:

Users would have to do this by manipulating the environment before.

Changelog: [Internal]

Differential Revision: D57067036
  • Loading branch information
blakef authored and facebook-github-bot committed May 7, 2024
1 parent be09d12 commit dbea8e1
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions packages/core-cli-utils/src/private/apple.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type AppleBuildOptions = {

type AppleBootstrapOption = {
// Enabled by default
hermes?: boolean | string,
newArchitecture: boolean,
...AppleOptions,
};
Expand Down Expand Up @@ -75,12 +76,26 @@ export const tasks = {
cwd: options.cwd,
}),
),
installDependencies: task(THIRD, 'Install CocoaPods dependencies', () =>
execa('bundle', ['exec', 'pod', 'install'], {
installDependencies: task(THIRD, 'Install CocoaPods dependencies', () => {
const env = {
RCT_NEW_ARCH_ENABLED: options.newArchitecture ? '1' : '0',
HERMES: '1',
};
if (options.hermes != null) {
switch (typeof options.hermes) {
case 'string':
env.HERMES = options.hermes;
break;
case 'boolean':
env.HERMES = options.hermes ? '1' : '0';
break;
}
}
return execa('bundle', ['exec', 'pod', 'install'], {
cwd: options.cwd,
env: {RCT_NEW_ARCH_ENABLED: options.newArchitecture ? '1' : '0'},
}),
),
env,
});
}),
}),

// 2. Build the iOS app using a setup environment
Expand Down

0 comments on commit dbea8e1

Please sign in to comment.