fluttercommunity / fluttercommunity/flutter_webview_plugin
Using WebviewScaffold to load URLs doesn't work in iOS
- 主要言語
- Java
- スター
- 1.5k
- フォーク
- 938
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## 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
1. 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.
2. Followed all the steps mentioned in the documentation and the key "NSAppTransportSecurity" is added to the Info.plist file as recommended in the documentation.
3. 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.
4. There are no errors logged on the console while running it.
5. 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
```
```
```
```
```
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、エントリーポイント WebviewScaffold を通じて iOS の動作を再現し、FlutterWebViewPlugin.launch() と比較し、文書化されている Info.plist NSAppTransportSecurity の設定を確認します。issue にはソースファイルやテストの指定がないため、最初に iOS の WebView 実装を特定し、再現可能な URL と失敗ケースを確立します。完了の条件は、Android の動作を後退させることなく、iOS 上で WebviewScaffold を通じて URL がレンダリングされることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- flutter, ios
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100