Using WebviewScaffold to load URLs doesn't work in iOS
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 30/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- flutter, ios
- 領域
- mobile
研究方向
先透過 WebviewScaffold 入口重現 iOS 行為,將其與 FlutterWebViewPlugin.launch() 比較,並檢視文件中說明的 Info.plist NSAppTransportSecurity 設定。此 issue 未指定原始檔案或測試,因此請先定位 iOS WebView 實作,並建立一個可重現的 URL 與失敗案例;完成的標準是 URL 能透過 WebviewScaffold 在 iOS 上渲染,且不造成 Android 行為回歸。
由索引模型根據 Issue 內容生成。
描述
System info
Issue occurs on: iOS
Plugin version: 0.4.0
Flutter doctor output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.2, on macOS 14.1.2 23B92 darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] Connected device (2 available)
[✓] Network resources
• No issues found!
Steps to Reproduce
- I am using the WebViewScaffold to launch a URL. This approach works fine on Android and the page is loaded. However, on iOS, it gives a white blank screen.
- Followed all the steps mentioned in the documentation and the key "NSAppTransportSecurity" is added to the Info.plist file as recommended in the documentation.
- The iOS app launches the URL and works fine if we use an instance of the FlutterWebViewPlugin to call the "launch()" method instead of the WebViewScaffold implementation.
- There are no errors logged on the console while running it.
- Here is the code that renders the view inside a StatefulWidget
...
return SafeArea(
child: WebviewScaffold(
url: _url,
mediaPlaybackRequiresUserGesture: false,
useWideViewPort: true,
appCacheEnabled: true,
geolocationEnabled: true,
invalidUrlRegex:
r'^(https:\/\/api\.whatsapp\.com|https:\/\/apps\.apple\.com|https:\/\/play\.google\.com|tel:|mailto:|https:\/\/www\.facebook\.com|https:\/\/www\.youtube\.com|https:\/\/www\.instagram\.com)',
debuggingEnabled: true,
),
);
Logs
- 主要語言
- Java
- 星號
- 1.5k
- 分支
- 933
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
fluttercommunity/flutter_webview_plugin 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 70/100
-
難度 3/5 1-2 天 新手友好度 35/100
fluttercommunity/flutter_webview_plugin#974 · 3 則留言 ·
-
難度 4/5 3-5 天 新手友好度 32/100
fluttercommunity/flutter_webview_plugin#973 · 3 則留言 · 1 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 25/100
fluttercommunity/flutter_webview_plugin#972 · 4 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 25/100
fluttercommunity/flutter_webview_plugin#971 · 1 則留言 ·
查看 fluttercommunity/flutter_webview_plugin 的全部 Issue
相似的 Issue
-
enhancement good first issue insight-module
難度 2/5 1-3 小時 新手友好度 86/100
sdlc-pro/spring-lens#606 ·
維護者通常 1 天內回覆
-
quality-assurance
難度 2/5 1-3 小時 新手友好度 62/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#252 ·
維護者通常 1 天內回覆
-
backlog kind/bug
難度 2/5 1-3 小時 新手友好度 83/100
TencentBlueKing/bk-job#4627 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 63/100
openrocket/openrocket#3460 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆