fluttercommunity / fluttercommunity/flutter_webview_plugin
userAgent parameter does not affect on iPadOS
- Ngôn ngữ chính
- Java
- Star
- 1.5k
- Fork
- 938
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
## System info
Issue occurs on: iOS (iPadOS)
Plugin version: 0.3.11
Flutter doctor output:
```
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.2, on Mac OS X 10.15.4 19E287, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[!] Xcode - develop for iOS and macOS (Xcode 11.5)
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
[✓] Android Studio (version 4.0)
[!] Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
✗ Android Studio not found at /Users/oboenikui/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-1/193.6453388/Android Studio 4.0 Preview.app/Contents
[✓] Android Studio (version 4.0)
[!] Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Ultimate Edition (version 2020.1.1)
[!] VS Code (version 1.45.0)
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
! Doctor found issues in 4 categories.
```
## Steps to Reproduce
1. Open `Settings` App > `Safari` > `Request Desktop Website` > Check `Other Websites` on iPad
2. Run example app
3. Tap `Open Webview (rect)`
4. Tap `Eval some javascript`
## Logs
See eval result below

## Solution
When I use WKWebView#customUserAgent instead, the problem is solved.
https://developer.apple.com/documentation/webkit/wkwebview/1414950-customuseragent
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu với luồng của ứng dụng ví dụ bằng cách sử dụng “Open Webview (rect)” và “Eval some javascript”, sau đó theo dõi cách plugin xử lý tham số userAgent trên iPadOS. So sánh hành vi đó với WKWebView#customUserAgent, như được đề xuất trong issue. Hoàn thành khi user agent được cấu hình ảnh hưởng đến kết quả đánh giá trong trường hợp “Request Desktop Website” được bật trên iPadOS.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- flutter, ios
- Lĩnh vực
- mobile-dev
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100