File tree Expand file tree Collapse file tree
packages/cli-platform-apple/src/commands/buildCommand Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ export function buildProject(
110110 getProcessOptions ( args ) ,
111111 ) ;
112112 let buildOutput = '' ;
113+ let buildResolved = false ;
113114 buildProcess . stdout . on ( 'data' , ( data : Buffer ) => {
114115 const stringData = data . toString ( ) ;
115116 buildOutput += stringData ;
@@ -124,8 +125,22 @@ export function buildProject(
124125 ) ;
125126 }
126127 }
128+ // Workaround: xcodebuild on Xcode 26.2+ may hang after build succeeds.
129+ // Detect BUILD SUCCEEDED and resolve immediately instead of waiting for close.
130+ if ( ! buildResolved && stringData . includes ( 'BUILD SUCCEEDED' ) ) {
131+ buildResolved = true ;
132+ if ( xcodebuildOutputFormatter ) {
133+ xcodebuildOutputFormatter . stdin . end ( ) ;
134+ } else {
135+ loader . stop ( ) ;
136+ }
137+ logger . success ( 'Successfully built the app' ) ;
138+ buildProcess . kill ( ) ;
139+ resolve ( buildOutput ) ;
140+ }
127141 } ) ;
128142 buildProcess . on ( 'close' , ( code : number ) => {
143+ if ( buildResolved ) return ;
129144 if ( xcodebuildOutputFormatter ) {
130145 xcodebuildOutputFormatter . stdin . end ( ) ;
131146 } else {
You can’t perform that action at this time.
0 commit comments