Skip to content

Commit 7497bbc

Browse files
committed
fix(sample-mobile): align RN/Expo to the 0.85.3 toolchain and exclude x86_64 sim
The "update everything to latest" pass drifted the mobile samples off the React Native 0.85 / Expo SDK 56 toolchain, breaking standalone installs/builds: - react 19.2.6 -> 19.2.3 (must equal react-native-renderer 19.2.3, else "Incompatible React versions" at runtime); same for react-dom / react-test-renderer. eslint 10 -> ^8.19.0, jest 30 -> ^29.6.3, @types/jest 29, typescript -> ^5.8.3, react-native 0.85.2 -> 0.85.3 (matches @react-native/*). - RN CLI + playground: exclude x86_64 from the iOS simulator build (EXCLUDED_ARCHS in project.pbxproj + Podfile post_install for all Pod targets) so it links the arm64-only cpp.js xcframeworks. Regenerate the RN CLI Podfile.lock for 0.85.3. - Expo: declare the cpp.js deps its source imports directly (@cpp.js/core-embind-jsi, @cpp.js/plugin-metro, hermes-compiler) — pnpm's strict node_modules does not expose them transitively from plugin-react-native. - Mark the mobile samples private (not published). - check-external-dependencies: pin the RN 0.85 / Expo SDK 56 toolchain so `check:deps --update` never bumps these back to npm latest. Note: Expo's iOS Release build still needs an x86_64-exclusion config plugin (expo prebuild regenerates the native project), tracked separately.
1 parent bdf5336 commit 7497bbc

10 files changed

Lines changed: 1075 additions & 1459 deletions

File tree

cppjs-samples/cppjs-playground-mobile-reactnative-cli/ios/Podfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,13 @@ target 'cppjsSampleReactNativeCLI' do
3030
:mac_catalyst_enabled => false,
3131
# :ccache_enabled => true
3232
)
33+
# cpp.js ships arm64-only iOS simulator slices. Release configs build for all
34+
# archs (ONLY_ACTIVE_ARCH=NO), so exclude x86_64 from every Pod target too —
35+
# the app target alone is not enough once Pods are built for the simulator.
36+
installer.pods_project.targets.each do |target|
37+
target.build_configurations.each do |build_config|
38+
build_config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
39+
end
40+
end
3341
end
3442
end

cppjs-samples/cppjs-playground-mobile-reactnative-cli/ios/cppjsSampleReactNativeCLI.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@
344344
COPY_PHASE_STRIP = NO;
345345
ENABLE_STRICT_OBJC_MSGSEND = YES;
346346
ENABLE_TESTABILITY = YES;
347-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
347+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "x86_64";
348348
GCC_C_LANGUAGE_STANDARD = gnu99;
349349
GCC_DYNAMIC_NO_PIC = NO;
350350
GCC_NO_COMMON_BLOCKS = YES;
@@ -426,7 +426,7 @@
426426
COPY_PHASE_STRIP = YES;
427427
ENABLE_NS_ASSERTIONS = NO;
428428
ENABLE_STRICT_OBJC_MSGSEND = YES;
429-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
429+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "x86_64";
430430
GCC_C_LANGUAGE_STANDARD = gnu99;
431431
GCC_NO_COMMON_BLOCKS = YES;
432432
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

cppjs-samples/cppjs-playground-mobile-reactnative-cli/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"@cpp.js/package-tiff-ios": "workspace:^",
4848
"@cpp.js/package-webp-ios": "workspace:^",
4949
"@cpp.js/package-zlib-ios": "workspace:^",
50-
"react": "19.2.6",
51-
"react-native": "0.85.2",
50+
"react": "19.2.3",
51+
"react-native": "0.85.3",
5252
"react-native-safe-area-context": "^5.8.0",
5353
"hermes-compiler": "*"
5454
},
@@ -66,14 +66,14 @@
6666
"@react-native/gradle-plugin": "0.85.3",
6767
"@react-native/metro-config": "0.85.3",
6868
"@react-native/typescript-config": "0.85.3",
69-
"@types/jest": "^30.0.0",
69+
"@types/jest": "^29.5.13",
7070
"@types/react": "^19.2.15",
7171
"@types/react-test-renderer": "^19.1.0",
72-
"eslint": "^10.4.0",
73-
"jest": "^30.4.2",
72+
"eslint": "^8.19.0",
73+
"jest": "^29.6.3",
7474
"prettier": "3.8.3",
75-
"react-test-renderer": "19.2.6",
76-
"typescript": "6.0.3"
75+
"react-test-renderer": "19.2.3",
76+
"typescript": "^5.8.3"
7777
},
7878
"engines": {
7979
"node": ">= 22.11.0"

cppjs-samples/cppjs-sample-mobile-reactnative-cli/ios/Podfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,13 @@ target 'cppjsSampleReactNativeCLI' do
3030
:mac_catalyst_enabled => false,
3131
# :ccache_enabled => true
3232
)
33+
# cpp.js ships arm64-only iOS simulator slices. Release configs build for all
34+
# archs (ONLY_ACTIVE_ARCH=NO), so exclude x86_64 from every Pod target too —
35+
# the app target alone is not enough once Pods are built for the simulator.
36+
installer.pods_project.targets.each do |target|
37+
target.build_configurations.each do |build_config|
38+
build_config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
39+
end
40+
end
3341
end
3442
end

0 commit comments

Comments
 (0)