Skip to content

chore(expo): adopt iOS UIScene lifecycle in the sample - #6865

Open
antonis wants to merge 1 commit into
mainfrom
chore/expo-sample-uiscene-lifecycle
Open

antonis wants to merge 1 commit into
mainfrom
chore/expo-sample-uiscene-lifecycle

Conversation

@antonis

@antonis antonis commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Enhancement

📜 Description

Makes the Expo sample adopt the iOS UIScene lifecycle with Expo's own EXExpoAppSceneDelegate (a Swift UIWindowSceneDelegate), via a new samples/expo/plugins/withIosSceneLifecycle.js config plugin.

Both guards throw a clear error if the Expo template drifts, so prebuild fails loudly rather than silently producing a non-scene app.

💡 Motivation and Context

This is added as a guard for issues similar to getsentry/sentry-cocoa#9281.

Note that a full check approach was initially tested with #6839 along with the cococa fix getsentry/sentry-cocoa#9282 but I've decided to go with the lighter approach that won't impact the CI load much.

💚 How did you test it?

  • CI

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing.
  • No breaking changes.

🔮 Next steps

Make the Expo sample run under the iOS UIScene lifecycle with Expo's own
EXExpoAppSceneDelegate (a Swift UIWindowSceneDelegate) via a new
withIosSceneLifecycle config plugin. This is the lifecycle Apple/Expo are
pushing every app toward ("Required by iOS 27"), so running the sample this
way keeps the SDK exercised under it.

Expo 57 ships ExpoAppSceneDelegate but does not wire it up during prebuild
yet, so the plugin adds the UIApplicationSceneManifest and adjusts the
generated AppDelegate to defer the window / React Native start to the scene
delegate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • chore(expo): adopt iOS UIScene lifecycle in the sample by antonis in #6865
  • chore(deps): bump nx from 22.7.7 to 22.7.12 by dependabot in #6857
  • chore(deps): bump compression from 1.7.5 to 1.8.2 by dependabot in #6856
  • chore(deps): bump postcss-selector-parser from 7.1.4 to 7.1.6 by dependabot in #6855
  • chore(deps): bump source-map-js from 1.2.1 to 1.2.2 by dependabot in #6854
  • chore(deps): bump proxy-addr from 2.0.7 to 2.0.8 by dependabot in #6853
  • chore(deps): bump handlebars from 4.7.9 to 4.7.10 by dependabot in #6862
  • chore(deps): update Wizard to v8.0.1 by github-actions in #6852

🤖 This preview updates automatically when you update the PR.

@antonis antonis added the ready-to-merge Triggers the full CI test suite label Oct 12, 2026
@antonis
antonis marked this pull request as ready for review October 12, 2026 08:28

@alwx alwx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me if I'm wrong but does this PR actially guard against getsentry/sentry-cocoa#9281?
That bug occurs only at runtime, the app freezes in the crash handler when attachScreenshot is true and the app crashes through std::terminate or abort(). The Expo CI workflow runs only expo prebuild and xcodebuild, and the E2E tests do not run the Expo sample. Which means CI proves only that the scene setup compiles.
In addition, the fix is already in sentry-cocoa 9.30.1, right?

@antonis

antonis commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

Correct me if I'm wrong but does this PR actially guard against getsentry/sentry-cocoa#9281?

@alwx The claim of guarding in the description is indeed not fully true 👍

Which means CI proves only that the scene setup compiles.

Exactly and adds the scene setup in the sample. I've fully tested this with an extra CI check in #6839 while developing the Cocoa fix but thought that it might be too much add a full CI check that would add extra CI delay. I guess we have three options forward:

@antonis
antonis requested a review from alwx October 12, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants