Repository navigation
App Clipが起動直後に白画面のまま固まる問題を修正 - #6672
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A8VA2PtrPhjrkYFWcEUcsH
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A8VA2PtrPhjrkYFWcEUcsH
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
💤 Files with no reviewable changes (6)
📝 WalkthroughWalkthroughApp Clip の起動処理を Objective-C から Expo ベースの Swift 実装へ移行しました。React Native の依存関係、リンク処理、JavaScript バンドル解決を追加しました。手順をドキュメント化しました。 ChangesApp Clip ブートストラップ
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AppClip
participant AppDelegate
participant ExpoReactNativeFactory
participant ReactNativeDelegate
AppClip->>AppDelegate: 起動または Invocation URL を受信
AppDelegate->>ExpoReactNativeFactory: React Native を初期化
ExpoReactNativeFactory->>ReactNativeDelegate: JavaScript バンドル URL を要求
AppDelegate->>ExpoAppDelegate: Universal Link を委譲
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This was referenced Aug 12, 2026
Merged
Merged
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
概要
App Clip(
ProdAppClip/CanaryAppClip)が起動直後に白画面のまま固まる不具合を修正する。App Clip ターゲットだけが React Native 素の
RCTAppDelegateを継承した旧式の Obj-C ブートストラップのまま残っており、本体アプリ(ios/AppDelegate.swift)が移行済みの Expo 方式(ExpoAppDelegate+ExpoReactNativeFactory)から取り残されていた。Expo SDK 57 / React Native 0.86 ではこの差が致命的で、Expo モジュールが 1 つも登録されないまま起動する。変更の種類
変更内容
ios/ProdAppClip/AppDelegate.swift/ios/CanaryAppClip/AppDelegate.swiftを追加し、本体アプリと同じExpoAppDelegate+ExpoReactNativeFactory+RCTAppDependencyProvider構成へ統一AppDelegate.h/AppDelegate.m/main.mを削除(エントリポイントは@UIApplicationMainが生成する)application(_:continue:restorationHandler:)でsuperを呼び、App Clip の起動 URL を Expo のサブスクライバへ転送するよう修正docs/ios-app-clip.mdを追加し、docs/README.mdのドキュメント一覧から参照根本原因
Expo モジュールが 1 つも登録されない
Expo SDK 57 で
EXAppContextを生成してregisterNativeModules()を呼ぶのはexpo/ios/AppDelegates/ExpoReactNativeFactory.mmのhost:didInitializeRuntime:だけになっている。RCTAppDelegateはRCTReactNativeFactoryしか作らないためこの経路を通らず、JS 側のrequireNativeModule()が軒並み失敗する。決定打が
react-native-app-clipで、isClip()→getBundleIdentifier()→requireNativeModule("ReactNativeAppClip")をモジュールのトップレベルで評価するため、src/utils/theme.tsやsrc/screens/Main.tsxが読み込まれた時点でバンドル評価ごと throw する。Release ビルドには redbox が無いので、ルートビューだけ残って白画面で固まったように見える。New Architecture の依存プロバイダが未設定
delegate.dependencyProvider = RCTAppDependencyProvider()が無いためthirdPartyFabricComponentsが空になり、autolink したネイティブコンポーネントが一切登録されない。併せて直る不具合
App Clip の起動 URL は
application(_:continue:restorationHandler:)にしか流れてこないが、旧実装はsuperを呼んでいなかったためexpo-linkingのLinkingAppDelegateSubscriberに転送されず、src/hooks/useDeepLink.tsのLinking.getInitialURL()が解決できない状態だった(bridgeless ではRCTLinkingManager側のgetInitialURLがself.bridge経由のため機能しない)。影響範囲とデグレリスク
PBXFileSystemSynchronizedRootGroup)構成のため、project.pbxprojの編集は不要。SWIFT_VERSION = 5.0は設定済みで、ExpoModulesProvider.swiftも既にコンパイル対象になっている。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ることnpm run lintは 631 ファイル、npm testは 218 suites / 2304 tests がすべてパス。npx markdownlint-cli2も追加ドキュメント 2 ファイルで 0 issues。なお Xcode ビルドと実機での起動確認は未実施。修正内容は
[email protected]/[email protected]/[email protected]/[email protected]/[email protected]のソースを読んで裏取りした静的解析に基づく。関連Issue
スクリーンショット(任意)
Generated by Claude Code
Summary by CodeRabbit
新機能
ドキュメント