File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,28 @@ export function getReactNativeProjectAppVersion(
7676 }
7777
7878 if ( parsedPlist && parsedPlist . CFBundleShortVersionString ) {
79+ if ( / M A R K E T I N G _ V E R S I O N / i. test ( parsedPlist . CFBundleShortVersionString ) ) {
80+ try {
81+ const xcodeProjectConfig =
82+ path . resolve ( resolvedPlistFile , "../" ) +
83+ ".xcodeproj/project.pbxproj" ;
84+ out . text (
85+ 'Using xcodeProjectConfig version, file path "'
86+ . concat ( xcodeProjectConfig , '".\n' )
87+ ) ;
88+ const xcodeContents = fs . readFileSync ( xcodeProjectConfig ) . toString ( ) ;
89+ const xcodeVersion = [ ...xcodeContents . matchAll ( / R e l e a s e [ \s \S ] * M A R K E T I N G _ V E R S I O N = ( \d + \. \d + \. \d + ) / gm) ] [ 0 ] [ 1 ] ;
90+ out . text (
91+ 'Using xcodeProjectConfig version, version "' . concat (
92+ xcodeVersion ,
93+ '".\n'
94+ )
95+ ) ;
96+ parsedPlist . CFBundleShortVersionString = xcodeVersion ;
97+ } catch ( error ) {
98+
99+ }
100+ }
79101 if ( isValidVersion ( parsedPlist . CFBundleShortVersionString ) ) {
80102 out . text (
81103 `Using the target binary version value "${ parsedPlist . CFBundleShortVersionString } " from "${ resolvedPlistFile } ".\n` ,
@@ -538,6 +560,17 @@ function getHermesCommand(): string {
538560 }
539561 } ;
540562 // assume if hermes-engine exists it should be used instead of hermesvm
563+ const hermesEngineNew = path . join (
564+ 'node_modules' ,
565+ 'react-native' ,
566+ 'sdks' ,
567+ 'hermesc' ,
568+ getHermesOSBin ( ) ,
569+ getHermesOSExe ( )
570+ ) ;
571+ if ( fileExists ( hermesEngineNew ) ) {
572+ return hermesEngineNew ;
573+ }
541574 const hermesEngine = path . join (
542575 'node_modules' ,
543576 'hermes-engine' ,
You can’t perform that action at this time.
0 commit comments