Skip to content

fix(ci): repair Android, iOS and macOS example builds - #680

Merged
Naturalclar merged 3 commits into
masterfrom
fix/ci-native-builds
Nov 16, 2026
Merged

Naturalclar merged 3 commits into
masterfrom
fix/ci-native-builds

Conversation

@Naturalclar

@Naturalclar Naturalclar commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Android, iOS and macOS fail on every PR. The JS checks (lint, flow, tsc) pass. There are no green native runs in the available history. These builds have probably been broken since react-native-test-app was added in #603, which reported no checks.

Root causes and fixes

Job Cause Fix
all native The library was never autolinked into the example app (react-native config listed only react-native-test-app), so CI wasn't building the picker's native code at all Declare the library in example/react-native.config.js with root: ..
iOS react-native-macos@0.75 sits in the example deps. Pod-install codegen processes its FBReactNativeSpec after react-native's and overwrites it with 0.75 specs, giving no member named 'allowCollapsableChildren' in NativeReactNativeFeatureFlags Align react-native-macos to ^0.76 and react-native to 0.76.9 (its peer requirement)
Android react-native-test-app 4.0.4 always compiles OnLoad.cpp on RN ≥ 0.76, which includes autolinking.h. The RN Gradle plugin only generates that file when New Architecture is on, so the build failed with 'autolinking.h' file not found Set newArchEnabled=true in the example (the RN 0.76 default)
Android Once linked, the library's build.gradle couldn't find the hoisted react-native Set REACT_NATIVE_NODE_MODULES_DIR in example/android/build.gradle
macOS npx pod-install run from example/macos actually installs example/ios pods. The macOS project wasn't declared in configureProjects, and the scheme is Example, not the inferred Example-macOS. Result: Xcode project for macOS not found Run pod install directly, add macos to configureProjects, pass --scheme Example
iOS / macOS macos-latest is now macOS 26 / Xcode 26. RN 0.76's fmt 9.1.0 pod fails there with call to consteval function ... is not a constant expression (also on Xcode 16.3+) Pin both jobs to macos-15 and select Xcode 16.2
iOS yarn ios boots the newest simulator on the runner (iOS 18.5), which Xcode 16.2 cannot target, so xcodebuild exits with code 70 Build with xcodebuild -destination 'generic/platform=iOS Simulator' instead of launching the app
all yarn cache dir doesn't exist in Yarn 4, so the cache step cached an error string. set-output is deprecated Use actions/setup-node's cache: yarn

Verification (local, Xcode 16.2 / JDK 17)

  • ./gradlew assembleDebug: BUILD SUCCESSFUL. The APK contains libreact_codegen_rnpicker.so
  • iOS simulator xcodebuild: BUILD SUCCEEDED, RNCPicker compiled
  • macOS xcodebuild -scheme Example: BUILD SUCCEEDED (react-native-macos 0.76.12 pods + RNCPicker)
  • yarn validate:eslint, validate:flow and validate:typescript pass

All 12 checks pass on this PR.

Not in this PR

yarn test:jest fails with Cannot read properties of undefined (reading 'testEnvironmentOptions'). The root uses Jest 26, but React Native 0.76's jest env needs Jest 29. CI doesn't run Jest, and I believe master fails the same way, though I didn't check it separately.

🤖 Generated with Claude Code

Naturalclar and others added 2 commits November 16, 2026 10:42
- Autolink the library in the example app via react-native.config.js;
  it was not symlinked into node_modules so CI never built its native code
- Declare the macOS project for react-native-test-app so run-macos can
  find it, and pass --scheme Example to the root macos script
- Run `pod install` in example/macos (npx pod-install installed ios pods)
- Align react-native-macos (0.75 -> 0.76) and react-native (0.76.3 ->
  0.76.9); codegen for the 0.75 macOS specs overwrote FBReactNativeSpec
  and broke the iOS build
- Enable newArchEnabled for the Android example; react-native-test-app
  compiles OnLoad.cpp on RN 0.76, which needs the new-arch autolinking.h
- Point the library's gradle at the hoisted react-native
- Replace the broken yarn cache step (`yarn cache dir` does not exist in
  Yarn 4, and set-output is deprecated) with setup-node's `cache: yarn`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macos-latest is now macOS 26 with Xcode 26, where the fmt 9.1.0 pod
shipped with React Native 0.76 fails with consteval errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
run-ios launched an iOS 18.5 simulator, which Xcode 16.2 cannot target
(xcodebuild exit code 70). CI only needs to verify the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Naturalclar
Naturalclar merged commit aadf569 into master Nov 16, 2026
12 checks passed
@Naturalclar
Naturalclar deleted the fix/ci-native-builds branch November 18, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant