|
| 1 | +# UIScene Plugin Risk Checklist |
| 2 | + |
| 3 | +- Project: `gsy_github_app_flutter` |
| 4 | +- Generated on: 2026-02-13 |
| 5 | +- Scope: iOS plugins listed in `.flutter-plugins-dependencies` |
| 6 | +- Method: static source scan for Scene lifecycle compatibility signals (`FlutterSceneLifeCycleDelegate`, `addSceneDelegate`, usage of `UIApplication.keyWindow` / `windows`, and AppDelegate lifecycle hooks). |
| 7 | + |
| 8 | +## High Risk |
| 9 | + |
| 10 | +### 1. `url_launcher_ios 6.3.6` |
| 11 | +- Risk level: High |
| 12 | +- Why: |
| 13 | + - Uses deprecated window lookup via `UIApplication.shared.keyWindow`, which is scene-unaware. |
| 14 | +- Evidence: |
| 15 | + - `/Users/guoshuyu/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.6/ios/url_launcher_ios/Sources/url_launcher_ios/URLLauncherPlugin.swift:22` |
| 16 | +- Impact: |
| 17 | + - In multi-scene/iPad multi-window mode, in-app Safari presentation may target the wrong scene or fail to present. |
| 18 | + |
| 19 | +### 2. `flutter_inappwebview_ios 1.1.2` |
| 20 | +- Risk level: High |
| 21 | +- Why: |
| 22 | + - Multiple code paths still use `keyWindow` / `UIApplication.shared.windows`, which can be incorrect under multi-scene. |
| 23 | +- Evidence: |
| 24 | + - `/Users/guoshuyu/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.1.2/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift:40` |
| 25 | + - `/Users/guoshuyu/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.1.2/ios/Classes/UIApplication/VisibleViewController.swift:13` |
| 26 | + - `/Users/guoshuyu/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.1.2/ios/Classes/WebAuthenticationSession/WebAuthenticationSession.swift:93` |
| 27 | +- Impact: |
| 28 | + - Headless WebView attach point, visible view-controller resolution, and web-auth presentation anchor may bind to the wrong window/scene. |
| 29 | + |
| 30 | +## Medium Risk |
| 31 | + |
| 32 | +### 1. `fluttertoast 8.2.10` |
| 33 | +- Risk level: Medium |
| 34 | +- Why: |
| 35 | + - Chooses UI window via `UIApplication.sharedApplication.windows` and key-window iteration. |
| 36 | +- Evidence: |
| 37 | + - `/Users/guoshuyu/.pub-cache/hosted/pub.dev/fluttertoast-8.2.10/ios/Classes/FluttertoastPlugin.m:130` |
| 38 | +- Impact: |
| 39 | + - Toast may appear on a non-active scene window or behave inconsistently in multi-window mode. |
| 40 | + |
| 41 | +## Low Risk |
| 42 | + |
| 43 | +### 1. `share_plus 12.0.1` |
| 44 | +- Risk level: Low |
| 45 | +- Why: |
| 46 | + - Uses `connectedScenes` and `UIWindowScene.windows` for root view-controller selection on iOS 13+. |
| 47 | +- Evidence: |
| 48 | + - `/Users/guoshuyu/.pub-cache/hosted/pub.dev/share_plus-12.0.1/ios/share_plus/Sources/share_plus/FPPSharePlusPlugin.m:12` |
| 49 | +- Note: |
| 50 | + - Keeps a fallback to `keyWindow` for iOS 12 and below (acceptable for non-scene OS versions). |
| 51 | + |
| 52 | +### 2. Other installed iOS plugins in this repo |
| 53 | +- `connectivity_plus 6.0.5` |
| 54 | +- `device_info_plus 10.1.2` |
| 55 | +- `package_info_plus 8.0.2` |
| 56 | +- `path_provider_foundation 2.5.1` |
| 57 | +- `permission_handler_apple 9.4.7` |
| 58 | +- `rive_common 0.4.11` |
| 59 | +- `shared_preferences_foundation 2.5.6` |
| 60 | +- `sqflite 2.3.3+1` |
| 61 | +- `webview_flutter_wkwebview 3.23.5` |
| 62 | + |
| 63 | +Risk level: Low (for UIScene lifecycle migration) |
| 64 | +- Why: |
| 65 | + - No direct AppDelegate lifecycle hook usage (`addApplicationDelegate` / `openURL` callbacks / `continueUserActivity`) detected in plugin runtime source paths. |
| 66 | + |
| 67 | +## Recommended Actions |
| 68 | + |
| 69 | +1. Upgrade first: |
| 70 | +- `url_launcher_ios` |
| 71 | +- `flutter_inappwebview_ios` |
| 72 | +- `fluttertoast` |
| 73 | + |
| 74 | +2. Run targeted iPad multi-window validation: |
| 75 | +- `url_launcher` in-app Safari presentation |
| 76 | +- InAppWebView / headless webview attach |
| 77 | +- Web auth session presentation anchor |
| 78 | +- Toast display target window |
| 79 | +- Share sheet presentation |
| 80 | + |
| 81 | +3. If upgrade is blocked: |
| 82 | +- Apply local patch to resolve active `UIWindowScene` and active window/VC instead of `keyWindow`/global `windows`. |
0 commit comments