@@ -6,7 +6,7 @@ import { spawn, spawnSync } from "node:child_process";
6
6
import * as fs from "node:fs" ;
7
7
import { URL , fileURLToPath } from "node:url" ;
8
8
import * as util from "node:util" ;
9
- import { readTextFile } from "../helpers.js" ;
9
+ import { readTextFile , toVersionNumber , v } from "../helpers.js" ;
10
10
import { setReactVersion } from "../internal/set-react-version.mts" ;
11
11
import type { BuildConfig , TargetPlatform } from "../types.js" ;
12
12
import { green , red , yellow } from "../utils/colors.mjs" ;
@@ -43,7 +43,17 @@ const PLATFORM_CONFIG: Record<TargetPlatform, PlatformConfig> = {
43
43
ios : {
44
44
name : "iOS" ,
45
45
engines : [ "jsc" , "hermes" ] ,
46
- isAvailable : ( ) => process . platform === "darwin" ,
46
+ isAvailable : ( { version, engine } ) => {
47
+ if ( process . platform !== "darwin" ) {
48
+ return false ;
49
+ }
50
+
51
+ if ( engine === "jsc" && toVersionNumber ( version ) >= v ( 0 , 80 , 0 ) ) {
52
+ return false ;
53
+ }
54
+
55
+ return true ;
56
+ } ,
47
57
prebuild : installPods ,
48
58
} ,
49
59
macos : {
@@ -203,15 +213,15 @@ function buildAndRun(platform: TargetPlatform) {
203
213
}
204
214
}
205
215
206
- async function buildRunTest ( { platform, variant } : BuildConfig ) {
216
+ async function buildRunTest ( { version , platform, variant } : BuildConfig ) {
207
217
const setup = PLATFORM_CONFIG [ platform ] ;
208
218
if ( ! setup ) {
209
219
log ( yellow ( `⚠ Unknown platform: ${ platform } ` ) ) ;
210
220
return ;
211
221
}
212
222
213
223
for ( const engine of setup . engines ) {
214
- const configWithEngine = { platform, variant, engine } ;
224
+ const configWithEngine = { version , platform, variant, engine } ;
215
225
if ( ! setup . isAvailable ( configWithEngine ) ) {
216
226
continue ;
217
227
}
@@ -285,13 +295,13 @@ if (platforms.length === 0) {
285
295
return job . then ( ( ) =>
286
296
withReactNativeVersion ( version , async ( ) => {
287
297
for ( const platform of platforms ) {
288
- await buildRunTest ( { platform, variant } ) ;
298
+ await buildRunTest ( { version , platform, variant } ) ;
289
299
}
290
300
} )
291
301
) ;
292
302
} , prestart ( ) )
293
303
. then ( ( ) => {
294
- showBanner ( ` Initialize new app` ) ;
304
+ showBanner ( " Initialize new app" ) ;
295
305
$ (
296
306
PACKAGE_MANAGER ,
297
307
"init-test-app" ,
@@ -306,7 +316,7 @@ if (platforms.length === 0) {
306
316
) ;
307
317
} )
308
318
. then ( ( ) => {
309
- showBanner ( ` Reconfigure existing app` ) ;
319
+ showBanner ( " Reconfigure existing app" ) ;
310
320
const args = [
311
321
"configure-test-app" ,
312
322
"-p" ,
0 commit comments