-
Notifications
You must be signed in to change notification settings - Fork 159
Add Expo cookbook (SDK 53, React 19) #457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
303f094
Add modern Expo cookbook (SDK 55, React 19)
535e097
Address PR feedback + add Maestro smoke tests
156f6b5
Remove Maestro screenshots from repo, add to gitignore
8308717
Fix Maestro smoke test flow
ff2fe45
Setup Expo dev build + Maestro CI
8cb9af7
Fix CI: use npx babel instead of yarn workspace exec
33cabca
CI: use macos-14 runner for Xcode 16.0 compat with expo-modules-core
2c3e6d1
CI: back to macos-15 + disable Swift strict concurrency for expo-modu…
5aa1c34
CI: force Swift 5 mode to fix expo-modules-core concurrency errors on…
0ad6f18
CI: use Xcode 16.2 to avoid expo-modules-core Swift 6 issues
f598b94
CI: try Xcode 16.1 for expo-modules-core Swift compat
1235fe9
CI: patch Podfile to set SWIFT_STRICT_CONCURRENCY=minimal for all pods
fc98d27
CI: force SWIFT_VERSION=5.0 on all pods via Podfile patch
414d07c
CI: use -Xfrontend -strict-concurrency=minimal in Swift flags
5cc4b68
CI: downgrade Swift 6 pods to Swift 5.10 language mode
17cee6e
CI: patch xcconfig files to force Swift 5 after pod install
b584c45
CI: also inject -strict-concurrency=minimal into OTHER_SWIFT_FLAGS
e12d164
CI: patch pbxproj Swift 6→5 + pass -swift-version 5 to xcodebuild
42e9ef7
CI: use Xcode 16.0 (Swift 5.10, no Swift 6 compiler)
c81ce47
Downgrade to Expo SDK 52 + RN 0.76 for Xcode 16.0 CI compat
263151a
CI: use macos-14 + Xcode 15.4 for Expo SDK 52 + RN 0.76
78ffbd1
Use Expo SDK 53 + RN 0.79 for better Xcode 15.x compat
501163e
CI: macos-15 + Xcode 16.0 for SDK 53 (needs iOS 18 SwiftUI)
0769f94
CI: use generic simulator destination + any available iPhone
929a485
CI: patch storyboard iOS 18→17.5 for Xcode 16.0 compat
3bae409
CI: patch storyboard toolsVersion for Xcode 16.0
2f9f3ae
CI: replace storyboard with Xcode 16.0 compatible minimal version
52d6d75
CI: use default Xcode 16.4 + patch expo-modules-core for Swift 6
b74312b
CI: use react-native start instead of expo start + increase timeouts
24d789d
CI: start Metro via node_modules/react-native/cli.js directly
0d9384b
CI: bundle JS offline instead of running Metro
9da52a6
Add @react-native-community/cli devDependency for bundle command
a388f96
CI: pass --config metro.config.js to bundle command
369ac37
CI: use expo export:embed instead of react-native bundle
b84aa77
CI: invoke expo CLI via local node_modules/expo/bin/cli
a118476
CI: set NODE_PATH to cookbook-expo node_modules for expo CLI
2c48a99
Set projectRoot explicitly in metro.config.js
4328668
CI: use absolute path for entry-file in expo export:embed
d47ecec
Stub Node.js-only deps in Metro for Expo cookbook
9986ca9
Fix React version: RN 0.79 requires React 19, not 18
9ee395e
Pin react to 19.0.0 to match react-native-renderer
d0a0d80
Force singleton react/react-native in Metro resolver
0131ca6
Fix Metro resolver to deduplicate React in monorepo
dff40b3
Add GL render check: assert non-black pixels in Maestro test
3f51d9e
Read GL pixels inside onDraw callback (before buffer swap)
59050db
Simplify GL check: onDraw callback proves shader ran
d3f7f39
Address PR review feedback
9465c84
CI: use yarn run -T babel for PnP compatibility
257e3ca
CI: revert to npx babel (yarn run fails in PnP on CI)
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| name: CI cookbook-expo | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
| branches: [master] | ||
|
|
||
| jobs: | ||
| e2e-ios: | ||
| runs-on: macos-15 | ||
| timeout-minutes: 45 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 24 | ||
|
|
||
| # Use default Xcode (16.4) — has matching simulator runtimes | ||
| # Expo SDK 53 Swift 6 issues handled by patching pbxproj after pod install | ||
|
|
||
|
|
||
| - run: corepack enable | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| yarn install | ||
| cd packages/cookbook-expo && yarn install | ||
|
|
||
| - name: Build gl-react packages | ||
| run: | | ||
| for d in packages/gl-react packages/gl-react-expo; do | ||
| npx babel --root-mode upward --source-maps --extensions '.ts,.tsx' -d "$d/lib" "$d/src" | ||
| done | ||
|
|
||
| - name: Expo prebuild | ||
| working-directory: packages/cookbook-expo | ||
| run: npx expo prebuild --platform ios --no-install | ||
|
|
||
| - name: Pod install | ||
| working-directory: packages/cookbook-expo/ios | ||
| run: pod install | ||
|
|
||
| # Patch expo-modules-core Swift sources to compile on Swift 6 (Xcode 16.4) | ||
| - name: Patch expo-modules-core for Swift 6 | ||
| run: | | ||
| # Add @preconcurrency import where needed | ||
| find packages/cookbook-expo/node_modules/expo-modules-core/ios -name "*.swift" | xargs sed -i '' 's/^import UIKit/@preconcurrency import UIKit/; s/^import Foundation/@preconcurrency import Foundation/' 2>/dev/null || true | ||
| # Suppress sendable warnings by adding nonisolated(unsafe) or @unchecked Sendable | ||
| # The simplest approach: set SWIFT_STRICT_CONCURRENCY=minimal in Pods pbxproj | ||
| sed -i '' 's/SWIFT_VERSION = 6\.0;/SWIFT_VERSION = 6.0; SWIFT_STRICT_CONCURRENCY = minimal;/g' packages/cookbook-expo/ios/Pods/Pods.xcodeproj/project.pbxproj 2>/dev/null || true | ||
|
|
||
| - name: Build iOS app for simulator | ||
| working-directory: packages/cookbook-expo | ||
| run: | | ||
| xcodebuild \ | ||
| -workspace ios/cookbookexpo.xcworkspace \ | ||
| -scheme cookbookexpo \ | ||
| -sdk iphonesimulator \ | ||
| -configuration Debug \ | ||
| -destination 'generic/platform=iOS Simulator' \ | ||
| -derivedDataPath build \ | ||
| CODE_SIGNING_ALLOWED=NO \ | ||
| -quiet | ||
|
|
||
| - name: Boot iOS Simulator | ||
| run: | | ||
| DEVICE_ID=$(xcrun simctl list devices available -j | python3 -c " | ||
| import json, sys | ||
| data = json.load(sys.stdin) | ||
| for runtime, devices in data['devices'].items(): | ||
| for d in devices: | ||
| if 'iPhone' in d['name'] and d['isAvailable']: | ||
| print(d['udid']) | ||
| sys.exit(0) | ||
| sys.exit(1) | ||
| ") | ||
| xcrun simctl boot "$DEVICE_ID" || true | ||
| echo "DEVICE_ID=$DEVICE_ID" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Install app on simulator | ||
| run: | | ||
| APP_PATH=$(find packages/cookbook-expo/build -name "*.app" -path "*/Debug-iphonesimulator/*" | head -1) | ||
| xcrun simctl install "$DEVICE_ID" "$APP_PATH" | ||
|
|
||
| # Bundle JS offline so Metro isn't needed at runtime | ||
| - name: Bundle JS | ||
| working-directory: packages/cookbook-expo | ||
| env: | ||
| NODE_PATH: ${{ github.workspace }}/packages/cookbook-expo/node_modules | ||
| run: | | ||
| node node_modules/expo/bin/cli export:embed \ | ||
| --platform ios \ | ||
| --entry-file "${{ github.workspace }}/packages/cookbook-expo/index.ts" \ | ||
| --bundle-output ios/main.jsbundle \ | ||
| --assets-dest ios \ | ||
| --dev false | ||
|
|
||
| - name: Reinstall app with bundle | ||
| run: | | ||
| APP_PATH=$(find packages/cookbook-expo/build -name "*.app" -path "*/Debug-iphonesimulator/*" | head -1) | ||
| cp packages/cookbook-expo/ios/main.jsbundle "$APP_PATH/main.jsbundle" | ||
| xcrun simctl install "$DEVICE_ID" "$APP_PATH" | ||
|
|
||
| - name: Install Maestro | ||
| run: | | ||
| curl -Ls "https://get.maestro.mobile.dev" | bash | ||
| echo "$HOME/.maestro/bin" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Run Maestro smoke test | ||
| working-directory: packages/cookbook-expo | ||
| env: | ||
| MAESTRO_DRIVER_STARTUP_TIMEOUT: 120000 | ||
| run: ~/.maestro/bin/maestro test .maestro/smoke.yaml | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: maestro-screenshots | ||
| path: ~/.maestro/tests/ | ||
| retention-days: 7 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files | ||
|
|
||
| # dependencies | ||
| node_modules/ | ||
|
|
||
| # Expo | ||
| .expo/ | ||
| dist/ | ||
| web-build/ | ||
| expo-env.d.ts | ||
|
|
||
| # Native | ||
| .kotlin/ | ||
| *.orig.* | ||
| *.jks | ||
| *.p8 | ||
| *.p12 | ||
| *.key | ||
| *.mobileprovision | ||
|
|
||
| # Metro | ||
| .metro-health-check* | ||
|
|
||
| # debug | ||
| npm-debug.* | ||
| yarn-debug.* | ||
| yarn-error.* | ||
|
|
||
| # macOS | ||
| .DS_Store | ||
| *.pem | ||
|
|
||
| # local env files | ||
| .env*.local | ||
|
|
||
| # typescript | ||
| *.tsbuildinfo | ||
|
|
||
| # generated native folders | ||
| /ios | ||
| /android | ||
| /build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| appId: com.glreact.cookbookexpo | ||
| --- | ||
| # Smoke test: verify the app launches and renders GL content | ||
| - launchApp | ||
|
|
||
| - extendedWaitUntil: | ||
| visible: "gl-react cookbook" | ||
| timeout: 60000 | ||
|
|
||
| - assertVisible: "UV gradient" | ||
| - assertVisible: "Hello GL" | ||
| - assertVisible: "Hello Blue" | ||
|
|
||
| # Verify the GL surface rendered non-black pixels | ||
| - extendedWaitUntil: | ||
| visible: "gl:rendered" | ||
| timeout: 10000 | ||
|
|
||
| - takeScreenshot: app-launched |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Expo/Metro requires node_modules (incompatible with Yarn PnP). | ||
| # Run `yarn install` from this directory for the setting to apply. | ||
| nodeLinker: node-modules | ||
|
gre marked this conversation as resolved.
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.