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 天内回复