@@ -18,7 +18,16 @@ import {
1818
1919export const packageIosCommand = curryOptions (
2020 new Command ( 'package:ios' ) . description ( 'Build iOS XCFramework' ) ,
21- getBuildOptions ( { platformName : 'ios' } )
21+ getBuildOptions ( { platformName : 'ios' } ) . map ( ( option ) =>
22+ option . name . startsWith ( '--build-folder' )
23+ ? {
24+ ...option ,
25+ description :
26+ option . description +
27+ " By default, the '<iOS project folder>/build' path will be used." ,
28+ }
29+ : option
30+ )
2231) . action (
2332 actionRunner ( async ( options : AppleBuildFlags ) => {
2433 const { projectRoot, platformConfig, userConfig } = getProjectInfo ( 'ios' ) ;
@@ -31,6 +40,11 @@ export const packageIosCommand = curryOptions(
3140 throw new Error ( 'iOS Xcode project not found in the configuration.' ) ;
3241 }
3342
43+ options . buildFolder ??= path . join (
44+ userConfig . project . ios . sourceDir ,
45+ 'build' // default build folder in iOS project layout
46+ ) ;
47+
3448 packageIosAction (
3549 options ,
3650 {
@@ -41,26 +55,8 @@ export const packageIosCommand = curryOptions(
4155 // therefore we resolve it manually from RN's package.json using Rock's utils
4256 reactNativeVersion : getReactNativeVersion ( projectRoot ) ,
4357 usePrebuiltRNCore : 0 , // for brownfield, it is required to build RN from source
44- fingerprintOptions : {
45- env : [ ] ,
46- extraSources : [ ] ,
47- ignorePaths : [ ] ,
48- autolinkingConfig : userConfig ,
49- } ,
50- remoteCacheProvider : null ,
5158 } ,
52- platformConfig ,
53- // below: Rock-dependent logic escape hatch
54- {
55- cacheRootPathOverride : path . join (
56- userConfig . project . ios . sourceDir ,
57- 'build' // default build folder in iOS project layout
58- ) ,
59- iosConfigOverride : {
60- sourceDir : userConfig . project . ios . sourceDir ,
61- xcodeProject : userConfig . project . ios . xcodeProject ,
62- } ,
63- }
59+ platformConfig
6460 ) ;
6561 } )
6662) ;
0 commit comments