[Bug] [iOS] App delegate swizzler has no UIScene equivalent — cold-launch & universal links miss Analytics/Dynamic Links on scene-based apps
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp, firebase, ios, unity
- Lĩnh vực
- analytics, mobile-dev
Hướng nghiên cứu
Bắt đầu từ app/src/invites/ios/invites_ios_startup.mm, đọc RunOnAppDelegateClasses và HookAppDelegateMethods cùng với các hook UIApplicationDelegate được liệt kê. Theo dõi các đường dẫn phân phối của scene delegate được mô tả trong issue và xác định cách coverage có thể đến được Dynamic Links và Analytics trong khi vẫn giữ nguyên implementation ban đầu; hoàn thành khi các đường dẫn URL và user-activity được báo cáo của cold-launch và scene đã kết nối không còn bị âm thầm loại bỏ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- C++
- Star
- 326
- Fork
- 138
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-cpp-sdk
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
firebase/firebase-cpp-sdk#1905 · 2 bình luận ·
-
api: firestore
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
firebase/firebase-cpp-sdk#1920 · 3 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
firebase/firebase-cpp-sdk#1904 · 1 bình luận ·
-
nightly-testing
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
firebase/firebase-cpp-sdk#1859 ·
-
nightly-testing
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
firebase/firebase-cpp-sdk#1858 ·
Tất cả issue của firebase/firebase-cpp-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
google/libultrahdr#485 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
godotengine/godot#123776 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 60/100
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ros2/common_interfaces#344 ·