Skip to content

chore(example): adopt UIScene lifecycle for Xcode 27 and update Podfile.lock - #118

Merged
gladiuscode merged 4 commits into
mainfrom
chore/example-uiscene-xcode-27
Sep 28, 2026
Merged

gladiuscode merged 4 commits into
mainfrom
chore/example-uiscene-xcode-27

Conversation

@gladiuscode

@gladiuscode gladiuscode commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Why

  • UIScene lifecycle: with Xcode 27 / the iOS 27 simulator, the example app crashes on launch without a scene-based lifecycle.
  • Podfile.lock: it was still pinned to react-native 0.84.1 after the upgrade to 0.86 (chore: upgrade to 86 #112), so pod install failed with stale prebuilt pods (React-VFS.yaml not found).

What changed

Example app and contributor docs only, no library changes:

  • Added SceneDelegate.swift, which creates the window and starts React Native, plus the UIApplicationSceneManifest in Info.plist (single scene).
  • AppDelegate no longer creates the window. window is kept as a weak reference because React Native still reads delegate.window. application(_:supportedInterfaceOrientationsFor:) is unchanged: it's deprecated in iOS 27 but still called for scene-based apps.
  • Regenerated Podfile.lock for react-native 0.86.0.
  • CocoaPods only through Bundler: bumped the bundled CocoaPods to 1.15.2 in example/Gemfile.lock and generated Podfile.lock with bundle exec pod install, as CI already does. 1.15.2 is the latest version allowed by the React Native template Gemfile (xcodeproj < 1.26.0; CocoaPods 1.16 needs xcodeproj >= 1.27). The previous Podfile.lock on main said COCOAPODS: 1.16.2 because it was generated with a global pod, outside the Gemfile constraints.
  • AGENTS.md: documented the Bundler-only CocoaPods workflow.

This is the same approach as lodev09/react-native-true-sheet#843.

Testing

On this branch the example builds with Xcode 27.2. The same scene lifecycle was exercised at runtime on the iPhone Duo (iOS 27.1), iPhone 16 (iOS 18.5) and iPhone 17 (iOS 26.5) simulators while working on #116.

Needed by #116, which should be merged after this one.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated the iOS example app’s launch flow to use the standard scene lifecycle, improving compatibility with current iOS project configurations.
  • Documentation
    • Clarified how to install the example app’s Ruby and iOS dependencies through Bundler, including CocoaPods version requirements and lockfile alignment.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⛔ Files ignored due to path filters (2)
  • example/Gemfile.lock is excluded by !**/*.lock
  • example/ios/Podfile.lock is excluded by !**/*.lock
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 8433d1da-c2b0-4c25-9257-4ac565ab7c41

📥 Commits

Reviewing files that changed from the base of the PR and between df7731e and 4c6a29f.

⛔ Files ignored due to path filters (2)
  • example/Gemfile.lock is excluded by !**/*.lock
  • example/ios/Podfile.lock is excluded by !**/*.lock

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 6a823906-495d-42cc-be4d-9349aa24d7a0

📥 Commits

Reviewing files that changed from the base of the PR and between e17f5f0 and df7731e.

⛔ Files ignored due to path filters (2)
  • example/Gemfile.lock is excluded by !**/*.lock
  • example/ios/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • AGENTS.md
  • example/ios/OrientationDirectorExample.xcodeproj/project.pbxproj
  • example/ios/OrientationDirectorExample/AppDelegate.swift
  • example/ios/OrientationDirectorExample/Info.plist
  • example/ios/OrientationDirectorExample/SceneDelegate.swift

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The example iOS app now starts React Native from a connected window scene. The project includes the scene delegate and scene manifest configuration, and its setup guidance documents Bundler-based Ruby and CocoaPods installation.

Changes

iOS example startup

Layer / File(s) Summary
Example iOS pod setup
AGENTS.md, example/ios/OrientationDirectorExample.xcodeproj/project.pbxproj
The setup instructions specify Bundler-based dependency installation and CocoaPods commands. Debug and Release settings set PODFILE_DIR to $(SRCROOT).
Scene-based React Native startup
example/ios/OrientationDirectorExample/Info.plist, example/ios/OrientationDirectorExample.xcodeproj/project.pbxproj, example/ios/OrientationDirectorExample/AppDelegate.swift, example/ios/OrientationDirectorExample/SceneDelegate.swift
The scene manifest selects SceneDelegate, which creates and assigns the window and starts the React Native factory when required objects are available. AppDelegate no longer creates the window or starts the factory at launch.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant SceneDelegate
  participant UIWindowScene
  participant AppDelegate
  participant ReactNativeFactory
  SceneDelegate->>UIWindowScene: Receive connected scene
  SceneDelegate->>AppDelegate: Obtain app delegate and factory
  SceneDelegate->>AppDelegate: Assign created window
  SceneDelegate->>ReactNativeFactory: Start with module name OrientationDirectorExample
Loading

Merge Risk: ⚪ Minimal · up to df773

The example starts React Native when its window scene connects, and its Bundler setup uses matching CocoaPods pins. No supported launch behavior is lost, and no actionable merge risk remains beyond normal validation.

Security Architecture Review

Security architecture risk: 🔵 Low · up to df773

The change is confined to the example app. The inspected startup path does not show a new exposed endpoint or bypassed security control, but behavior after scene disconnection or reconnection remains unconfirmed.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The observed lifecycle change affects the example iOS app’s configured single scene, rather than a library entrypoint or cross-service path.

Trust Boundaries and Controls

  • observed — The scene callback accepts an operating-system scene, requires a UIWindowScene and the existing AppDelegate factory, then starts the example module. The inspected callback contains no authorization check that the move could bypass.

Resilience and Maintainability Implications

  • inferred — Initial factory and window ownership is explicit, but the source alone cannot establish window or React Native surface ownership after failed startup or scene reconnection.

Hardening Proposals

  • proposed — Establish the factory’s restart contract and exercise scene disconnect and reconnection before relying on repeated scene startup; add explicit recovery handling if that contract requires it.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies both primary changes: adopting the UIScene lifecycle for Xcode 27 and updating Podfile.lock.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

gladiuscode and others added 4 commits September 28, 2026 16:29
Xcode 27 / iOS 27 simulator crash on launch without a scene-based lifecycle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bump the bundled CocoaPods to 1.15.2, the latest version allowed by the
React Native template Gemfile (xcodeproj < 1.26.0), and regenerate
Podfile.lock with `bundle exec pod install`, as CI does.
Also add the missing nkf entry to Gemfile.lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gladiuscode
gladiuscode force-pushed the chore/example-uiscene-xcode-27 branch from df7731e to 4c6a29f Compare September 28, 2026 14:30
@gladiuscode
gladiuscode merged commit 601bd5f into main Sep 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant