fluttercommunity / fluttercommunity/flutter_webview_plugin

userAgent parameter does not affect on iPadOS

オープン
#762 コメント 0 件 リアクション 3 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
1.5k
フォーク
938
PR マージ指標
30日以内にマージされた PR はありません

説明

## 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

![image](https://user-images.githubusercontent.com/3191462/83436690-3f680080-a479-11ea-9132-bd5f56eaba68.png)

## Solution

When I use WKWebView#customUserAgent instead, the problem is solved.

https://developer.apple.com/documentation/webkit/wkwebview/1414950-customuseragent

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

“Open Webview (rect)” と “Eval some javascript” を使用するサンプルアプリのフローから始め、次にプラグインが iPadOS 上で userAgent パラメーターをどのように処理しているかを追跡します。issue で提案されているとおり、その動作を WKWebView#customUserAgent と比較します。iPadOS で “Request Desktop Website” が有効になっている場合に、設定した user agent が評価結果に影響すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
flutter, ios
領域
mobile-dev
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。