[Bug] [iOS] App delegate swizzler has no UIScene equivalent — cold-launch & universal links miss Analytics/Dynamic Links on scene-based apps
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- cpp, firebase, ios, unity
- 領域
- analytics, mobile-dev
調査の方向性
app/src/invites/ios/invites_ios_startup.mm から始め、RunOnAppDelegateClasses と HookAppDelegateMethods を、記載されている UIApplicationDelegate フックと併せて読みます。issue で説明されている scene delegate の配信経路を追跡し、元の実装を維持しながら Dynamic Links と Analytics にカバレッジを到達させる方法を判断します。完了の条件は、報告されている cold-launch と接続済みシーンの URL および user-activity の経路が、暗黙のうちに破棄されなくなることです。
索引モデルが issue の本文から書いたものです。
説明
Environment
- Platform: iOS (scene-based lifecycle, UIWindowSceneDelegate)
- Firebase C++ SDK version: (also consumed via Firebase Unity SDK 12.10.1)
- Installed via: Unity (FirebaseCppApp / FirebaseCppAnalytics), with FirebaseAnalytics/FirebaseCore pods 11.14.0, GoogleUtilities 8.1.2
- Relevant products: Analytics (campaign attribution)
Problem Description
The C++ SDK's iOS app-delegate swizzler (app/src/invites/ios/invites_ios_startup.mm, hooking installed via +load → RunOnAppDelegateClasses → HookAppDelegateMethods) only replaces UIApplicationDelegate methods:
- application:openURL:options:
- application:openURL:sourceApplication:annotation:
- application:continueUserActivity:restorationHandler:
- applicationDidBecomeActive:
There is no UISceneDelegate/UIWIndowSceneDelegate handling anywhere in the C++ SDK (looking at unity-v12.10.1 and v13.10.0)
On modern scene-based apps (UIWindowSceneDelegate), URL/NSUserActivity delivery moves off the app delegate onto the scene delegate. The C++ SDK adds nothing on top. As a result these link-delivery paths reach neither the C++ Dynamic Links machinery nor Analytics:
- scene:willConnectToSession:options: — cold-launch deep links (connectionOptions.URLContexts) and cold-launch universal links (connectionOptions.userActivities)
- scene:openURLContexts: — deep links delivered while the scene is already connected
- scene:continueUserActivity: — universal links delivered while the scene is already connected
Impact: on scene-based iOS apps, cold-launch deep/universal links and connected-scene universal links are silently dropped by the SDK.
Steps to reproduce:
- Scene-based iOS app (Unity export uses UnityScene : UIWindowSceneDelegate in their latest Editor versions).
- Register a Dynamic Link / campaign URL.
- Cold-launch the app via a universal link → delivered to scene:willConnectToSession:options:.
- Observe: no firebase::/GUL frame in the stack for that delivery; no Dynamic Link resolution; no Analytics campaign event. (Same for scene:continueUserActivity: or scene:openURLContexts: while connected.)
Question for maintainers:
- Is scene-delegate support planned for the C++ SDK's swizzler?
Workaround we're using (and would like validated):
We swizzle only the three uncovered scene methods on the scene delegate and forward to [FIRAnalytics handleOpenURL:] / [FIRAnalytics handleUserActivity:], chaining to the original implementation so the engine's own deep-link handling is preserved. Is this the recommended approach, and is there any double-handling risk if the SDK later completes scene coverage?
- 主要言語
- C++
- スター
- 326
- フォーク
- 138
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-cpp-sdk のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
firebase/firebase-cpp-sdk#1905 · コメント 2 件 ·
-
api: firestore
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
firebase/firebase-cpp-sdk#1920 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
firebase/firebase-cpp-sdk#1904 · コメント 1 件 ·
-
nightly-testing
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
firebase/firebase-cpp-sdk#1859 ·
-
nightly-testing
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
firebase/firebase-cpp-sdk#1858 ·
firebase/firebase-cpp-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main オープンai_reviewed
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ydb-platform/ydb#53974 · コメント 3 件 ·