merge develop

This commit is contained in:
Lorenzo Pichilli 2022-10-04 14:51:48 +02:00
commit caa5c7525e
18 changed files with 709 additions and 45 deletions

493
.all-contributorsrc Normal file
View File

@ -0,0 +1,493 @@
{
"projectName": "flutter_inappwebview",
"projectOwner": "pichillilorenzo",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": true,
"commitConvention": "none",
"contributors": [
{
"login": "AlexV525",
"name": "Alex Li",
"avatar_url": "https://avatars.githubusercontent.com/u/15884415?v=4",
"profile": "https://blog.alexv525.com/",
"contributions": [
"code"
]
},
{
"login": "crazecoder",
"name": "1/2",
"avatar_url": "https://avatars.githubusercontent.com/u/18387906?v=4",
"profile": "https://github.com/crazecoder",
"contributions": [
"code"
]
},
{
"login": "cbodin",
"name": "Christofer Bodin",
"avatar_url": "https://avatars.githubusercontent.com/u/220255?v=4",
"profile": "https://github.com/cbodin",
"contributions": [
"code"
]
},
{
"login": "matthewlloyd",
"name": "Matthew Lloyd",
"avatar_url": "https://avatars.githubusercontent.com/u/2041996?v=4",
"profile": "https://github.com/matthewlloyd",
"contributions": [
"code"
]
},
{
"login": "carloserazo47",
"name": "C E",
"avatar_url": "https://avatars.githubusercontent.com/u/83635384?v=4",
"profile": "https://github.com/carloserazo47",
"contributions": [
"code"
]
},
{
"login": "robsonmeemo",
"name": "Robson Araujo",
"avatar_url": "https://avatars.githubusercontent.com/u/47990393?v=4",
"profile": "https://github.com/robsonmeemo",
"contributions": [
"code"
]
},
{
"login": "ryanhz",
"name": "Ryan",
"avatar_url": "https://avatars.githubusercontent.com/u/1142612?v=4",
"profile": "https://github.com/ryanhz",
"contributions": [
"code"
]
},
{
"login": "CodeEagle",
"name": "CodeEagle",
"avatar_url": "https://avatars.githubusercontent.com/u/2311352?v=4",
"profile": "https://codeeagle.github.io/",
"contributions": [
"code"
]
},
{
"login": "tneotia",
"name": "Tanay Neotia",
"avatar_url": "https://avatars.githubusercontent.com/u/50850142?v=4",
"profile": "https://github.com/tneotia",
"contributions": [
"code"
]
},
{
"login": "panndoraBoo",
"name": "Jamie Joost",
"avatar_url": "https://avatars.githubusercontent.com/u/8928207?v=4",
"profile": "https://github.com/panndoraBoo",
"contributions": [
"code"
]
},
{
"login": "deandreamatias",
"name": "Matias de Andrea",
"avatar_url": "https://avatars.githubusercontent.com/u/21011641?v=4",
"profile": "https://deandreamatias.com/",
"contributions": [
"code"
]
},
{
"login": "YouCii",
"name": "YouCii",
"avatar_url": "https://avatars.githubusercontent.com/u/17899073?v=4",
"profile": "https://blog.csdn.net/j550341130",
"contributions": [
"code"
]
},
{
"login": "cutzmf",
"name": "Salnikov Sergey",
"avatar_url": "https://avatars.githubusercontent.com/u/1662033?v=4",
"profile": "https://github.com/cutzmf",
"contributions": [
"code"
]
},
{
"login": "a00012025",
"name": "Po-Jui Chen",
"avatar_url": "https://avatars.githubusercontent.com/u/12824216?v=4",
"profile": "https://github.com/a00012025",
"contributions": [
"code"
]
},
{
"login": "Manuito83",
"name": "Manuito",
"avatar_url": "https://avatars.githubusercontent.com/u/4816367?v=4",
"profile": "https://github.com/Manuito83",
"contributions": [
"code"
]
},
{
"login": "setcy",
"name": "setcy",
"avatar_url": "https://avatars.githubusercontent.com/u/86180691?v=4",
"profile": "https://github.com/setcy",
"contributions": [
"code"
]
},
{
"login": "EArminjon2",
"name": "EArminjon",
"avatar_url": "https://avatars.githubusercontent.com/u/92172436?v=4",
"profile": "https://github.com/EArminjon2",
"contributions": [
"code"
]
},
{
"login": "ashank96",
"name": "Ashank Bharati",
"avatar_url": "https://avatars.githubusercontent.com/u/22197948?v=4",
"profile": "https://www.linkedin.com/in/ashank-bharati-497989127/",
"contributions": [
"code"
]
},
{
"login": "chownation",
"name": "Michael Chow",
"avatar_url": "https://avatars.githubusercontent.com/u/1755207?v=4",
"profile": "https://dart.art/",
"contributions": [
"code"
]
},
{
"login": "RodXander",
"name": "Osvaldo Saez",
"avatar_url": "https://avatars.githubusercontent.com/u/23609784?v=4",
"profile": "https://github.com/RodXander",
"contributions": [
"code"
]
},
{
"login": "rsydor",
"name": "rsydor",
"avatar_url": "https://avatars.githubusercontent.com/u/79581663?v=4",
"profile": "https://github.com/rsydor",
"contributions": [
"code"
]
},
{
"login": "hoanglm4",
"name": "Le Minh Hoang",
"avatar_url": "https://avatars.githubusercontent.com/u/7067757?v=4",
"profile": "https://github.com/hoanglm4",
"contributions": [
"code"
]
},
{
"login": "Miiha",
"name": "Michael Kao",
"avatar_url": "https://avatars.githubusercontent.com/u/3897167?v=4",
"profile": "https://github.com/Miiha",
"contributions": [
"code"
]
},
{
"login": "cloudygeek",
"name": "cloudygeek",
"avatar_url": "https://avatars.githubusercontent.com/u/6059542?v=4",
"profile": "https://github.com/cloudygeek",
"contributions": [
"code"
]
},
{
"login": "chreck",
"name": "Christoph Eck",
"avatar_url": "https://avatars.githubusercontent.com/u/8030398?v=4",
"profile": "https://github.com/chreck",
"contributions": [
"code"
]
},
{
"login": "Ser1ous",
"name": "Ser1ous",
"avatar_url": "https://avatars.githubusercontent.com/u/4497968?v=4",
"profile": "https://github.com/Ser1ous",
"contributions": [
"code"
]
},
{
"login": "ItsCalebJones",
"name": "Caleb Jones",
"avatar_url": "https://avatars.githubusercontent.com/u/4519230?v=4",
"profile": "https://spacelaunchnow.me/",
"contributions": [
"code"
]
},
{
"login": "savy-91",
"name": "Saverio Murgia",
"avatar_url": "https://avatars.githubusercontent.com/u/6215122?v=4",
"profile": "https://sungazer.io/",
"contributions": [
"code"
]
},
{
"login": "tranductam2802",
"name": "Trần Đức Tâm",
"avatar_url": "https://avatars.githubusercontent.com/u/4957579?v=4",
"profile": "https://github.com/tranductam2802",
"contributions": [
"code"
]
},
{
"login": "pcqpcq",
"name": "Joker",
"avatar_url": "https://avatars.githubusercontent.com/u/1411571?v=4",
"profile": "https://pcqpcq.me/",
"contributions": [
"code"
]
},
{
"login": "ycv005",
"name": "Yash Chandra Verma",
"avatar_url": "https://avatars.githubusercontent.com/u/26734819?v=4",
"profile": "https://www.linkedin.com/in/ycv005/",
"contributions": [
"code"
]
},
{
"login": "arneke",
"name": "Arne Kepp",
"avatar_url": "https://avatars.githubusercontent.com/u/425235?v=4",
"profile": "https://github.com/arneke",
"contributions": [
"code"
]
},
{
"login": "omralcrt",
"name": "Ömral Cörüt",
"avatar_url": "https://avatars.githubusercontent.com/u/12418327?v=4",
"profile": "https://omralcrt.github.io/",
"contributions": [
"code"
]
},
{
"login": "albatrosify",
"name": "LrdHelmchen",
"avatar_url": "https://avatars.githubusercontent.com/u/64252708?v=4",
"profile": "https://github.com/albatrosify",
"contributions": [
"code"
]
},
{
"login": "gunantosteven",
"name": "Steven Gunanto",
"avatar_url": "https://avatars.githubusercontent.com/u/8141036?v=4",
"profile": "https://ungapps.com/",
"contributions": [
"code"
]
},
{
"login": "DRSchlaubi",
"name": "Michael Rittmeister",
"avatar_url": "https://avatars.githubusercontent.com/u/16060205?v=4",
"profile": "https://schlau.bi/",
"contributions": [
"code"
]
},
{
"login": "AAkira",
"name": "Akira Aratani",
"avatar_url": "https://avatars.githubusercontent.com/u/3386962?v=4",
"profile": "https://aakira.app/",
"contributions": [
"code"
]
},
{
"login": "Doflatango",
"name": "Doflatango",
"avatar_url": "https://avatars.githubusercontent.com/u/3091033?v=4",
"profile": "https://github.com/Doflatango",
"contributions": [
"code"
]
},
{
"login": "Eddayy",
"name": "Edmund Tay",
"avatar_url": "https://avatars.githubusercontent.com/u/17043852?v=4",
"profile": "https://github.com/Eddayy",
"contributions": [
"code"
]
},
{
"login": "andreidiaconu",
"name": "Andrei Diaconu",
"avatar_url": "https://avatars.githubusercontent.com/u/1402046?v=4",
"profile": "https://andreidiaconu.com/",
"contributions": [
"code"
]
},
{
"login": "plateaukao",
"name": "Daniel Kao",
"avatar_url": "https://avatars.githubusercontent.com/u/4084738?v=4",
"profile": "https://github.com/plateaukao",
"contributions": [
"code"
]
},
{
"login": "xtyxtyx",
"name": "xuty",
"avatar_url": "https://avatars.githubusercontent.com/u/15033141?v=4",
"profile": "https://github.com/xtyxtyx",
"contributions": [
"code"
]
},
{
"login": "wwwdata",
"name": "Ben Bieker",
"avatar_url": "https://avatars.githubusercontent.com/u/818880?v=4",
"profile": "https://bieker.ninja/",
"contributions": [
"code"
]
},
{
"login": "phamnhuvu-dev",
"name": "Phạm Như Vũ",
"avatar_url": "https://avatars.githubusercontent.com/u/22906656?v=4",
"profile": "https://github.com/phamnhuvu-dev",
"contributions": [
"code"
]
},
{
"login": "SebastienBtr",
"name": "SebastienBtr",
"avatar_url": "https://avatars.githubusercontent.com/u/18089010?v=4",
"profile": "https://github.com/SebastienBtr",
"contributions": [
"code"
]
},
{
"login": "fattiger00",
"name": "NeZha",
"avatar_url": "https://avatars.githubusercontent.com/u/38494401?v=4",
"profile": "https://github.com/fattiger00",
"contributions": [
"code"
]
},
{
"login": "klydra",
"name": "Jan Klinge",
"avatar_url": "https://avatars.githubusercontent.com/u/40038209?v=4",
"profile": "https://github.com/klydra",
"contributions": [
"code"
]
},
{
"login": "PauloDurrerMelo",
"name": "PauloDurrerMelo",
"avatar_url": "https://avatars.githubusercontent.com/u/29310557?v=4",
"profile": "https://github.com/PauloDurrerMelo",
"contributions": [
"code"
]
},
{
"login": "benmeemo",
"name": "benmeemo",
"avatar_url": "https://avatars.githubusercontent.com/u/47991706?v=4",
"profile": "https://github.com/benmeemo",
"contributions": [
"code"
]
},
{
"login": "cinos1",
"name": "cinos",
"avatar_url": "https://avatars.githubusercontent.com/u/19343437?v=4",
"profile": "https://github.com/cinos1",
"contributions": [
"code"
]
},
{
"login": "juicycleff",
"name": "Rex Raphael",
"avatar_url": "https://avatars.githubusercontent.com/u/11243590?v=4",
"profile": "https://xraph.com/",
"contributions": [
"code"
]
},
{
"login": "Sense545",
"name": "Jan Henrik Høiland",
"avatar_url": "https://avatars.githubusercontent.com/u/769406?v=4",
"profile": "https://github.com/Sense545",
"contributions": [
"code"
]
},
{
"login": "igtm",
"name": "Iguchi Tomokatsu",
"avatar_url": "https://avatars.githubusercontent.com/u/6331737?v=4",
"profile": "https://github.com/igtm",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"linkToUsage": false
}

View File

@ -21,6 +21,24 @@
- Removed `URLProtectionSpace.iosIsProxy` property
- `historyUrl` and `baseUrl` of `InAppWebViewInitialData` can be `null`
## 5.4.4+2
- Fixed LICENSE
## 5.4.4+1
- Fixed README
## 5.4.4
- Added support for Android 33
- Fixed possible null pointer exception in Android `ChromeCustomTabsActivity.java`
## 5.4.3+8
- Merged "Xcode 14 build error: Stored properties cannot be marked potentially unavailable with '@available'" [#1238](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1238) (thanks to [CodeEagle](https://github.com/CodeEagle))
- Fixed example for iOS
## 5.4.3+7
- Fixed possible Android java.lang.NullPointerException in "InAppBrowserActivity.onCreateOptionsMenu" about "webView.getTitle()"

13
LICENSE
View File

@ -175,7 +175,18 @@
END OF TERMS AND CONDITIONS
Copyright 2018-2020 Lorenzo Pichilli
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2022 Lorenzo Pichilli
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

105
README.md
View File

@ -1,14 +1,16 @@
# Flutter InAppWebView Plugin [![Share on Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Flutter%20InAppBrowser%20plugin!&url=https://github.com/pichillilorenzo/flutter_inappwebview&hashtags=flutter,flutterio,dart,dartlang,webview) [![Share on Facebook](https://img.shields.io/badge/share-facebook-blue.svg?longCache=true&style=flat&colorB=%234267b2)](https://www.facebook.com/sharer/sharer.php?u=https%3A//github.com/pichillilorenzo/flutter_inappwebview)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-53-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![Pub](https://img.shields.io/pub/v/flutter_inappwebview.svg)](https://pub.dartlang.org/packages/flutter_inappwebview)
[![pub points](https://badges.bar/flutter_inappwebview/pub%20points)](https://pub.dev/packages/flutter_inappwebview/score)
[![popularity](https://badges.bar/flutter_inappwebview/popularity)](https://pub.dev/packages/flutter_inappwebview/score)
[![likes](https://badges.bar/flutter_inappwebview/likes)](https://pub.dev/packages/flutter_inappwebview/score)
[![Pub](https://img.shields.io/pub/v/flutter_inappwebview?include_prereleases)](https://pub.dartlang.org/packages/flutter_inappwebview)
[![Pub Points](https://img.shields.io/pub/points/flutter_inappwebview)](https://pub.dev/packages/flutter_inappwebview/score)
[![Pub Popularity](https://img.shields.io/pub/popularity/flutter_inappwebview)](https://pub.dev/packages/flutter_inappwebview/score)
[![Pub Likes](https://img.shields.io/pub/likes/flutter_inappwebview)](https://pub.dev/packages/flutter_inappwebview/score)
[![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true&style=flat-square)](https://stackoverflow.com/questions/tagged/flutter-inappwebview)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](/LICENSE)
[![Donate to this project](https://img.shields.io/badge/support-donate-yellow.svg)](https://inappwebview.dev/donate/)
[![GitHub contributors](https://img.shields.io/github/contributors/pichillilorenzo/flutter_inappwebview)](https://github.com/pichillilorenzo/flutter_inappwebview/graphs/contributors)
[![GitHub forks](https://img.shields.io/github/forks/pichillilorenzo/flutter_inappwebview?style=social)](https://github.com/pichillilorenzo/flutter_inappwebview)
[![GitHub stars](https://img.shields.io/github/stars/pichillilorenzo/flutter_inappwebview?style=social)](https://github.com/pichillilorenzo/flutter_inappwebview)
@ -71,4 +73,95 @@ To make it work properly on the Web platformm, you need to add the `web_support.
## Support
Did you find this plugin useful? Please consider to [make a donation](https://inappwebview.dev/donate/) to help improve it!
Did you find this plugin useful? Please consider to [make a donation](https://inappwebview.dev/donate/) to help improve it!
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center"><a href="https://blog.alexv525.com/"><img src="https://avatars.githubusercontent.com/u/15884415?v=4?s=100" width="100px;" alt="Alex Li"/><br /><sub><b>Alex Li</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=AlexV525" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/crazecoder"><img src="https://avatars.githubusercontent.com/u/18387906?v=4?s=100" width="100px;" alt="1/2"/><br /><sub><b>1/2</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=crazecoder" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/cbodin"><img src="https://avatars.githubusercontent.com/u/220255?v=4?s=100" width="100px;" alt="Christofer Bodin"/><br /><sub><b>Christofer Bodin</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=cbodin" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/matthewlloyd"><img src="https://avatars.githubusercontent.com/u/2041996?v=4?s=100" width="100px;" alt="Matthew Lloyd"/><br /><sub><b>Matthew Lloyd</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=matthewlloyd" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/carloserazo47"><img src="https://avatars.githubusercontent.com/u/83635384?v=4?s=100" width="100px;" alt="C E"/><br /><sub><b>C E</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=carloserazo47" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/robsonmeemo"><img src="https://avatars.githubusercontent.com/u/47990393?v=4?s=100" width="100px;" alt="Robson Araujo"/><br /><sub><b>Robson Araujo</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=robsonmeemo" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ryanhz"><img src="https://avatars.githubusercontent.com/u/1142612?v=4?s=100" width="100px;" alt="Ryan"/><br /><sub><b>Ryan</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=ryanhz" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://codeeagle.github.io/"><img src="https://avatars.githubusercontent.com/u/2311352?v=4?s=100" width="100px;" alt="CodeEagle"/><br /><sub><b>CodeEagle</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=CodeEagle" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/tneotia"><img src="https://avatars.githubusercontent.com/u/50850142?v=4?s=100" width="100px;" alt="Tanay Neotia"/><br /><sub><b>Tanay Neotia</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=tneotia" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/panndoraBoo"><img src="https://avatars.githubusercontent.com/u/8928207?v=4?s=100" width="100px;" alt="Jamie Joost"/><br /><sub><b>Jamie Joost</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=panndoraBoo" title="Code">💻</a></td>
<td align="center"><a href="https://deandreamatias.com/"><img src="https://avatars.githubusercontent.com/u/21011641?v=4?s=100" width="100px;" alt="Matias de Andrea"/><br /><sub><b>Matias de Andrea</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=deandreamatias" title="Code">💻</a></td>
<td align="center"><a href="https://blog.csdn.net/j550341130"><img src="https://avatars.githubusercontent.com/u/17899073?v=4?s=100" width="100px;" alt="YouCii"/><br /><sub><b>YouCii</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=YouCii" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/cutzmf"><img src="https://avatars.githubusercontent.com/u/1662033?v=4?s=100" width="100px;" alt="Salnikov Sergey"/><br /><sub><b>Salnikov Sergey</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=cutzmf" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/a00012025"><img src="https://avatars.githubusercontent.com/u/12824216?v=4?s=100" width="100px;" alt="Po-Jui Chen"/><br /><sub><b>Po-Jui Chen</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=a00012025" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/Manuito83"><img src="https://avatars.githubusercontent.com/u/4816367?v=4?s=100" width="100px;" alt="Manuito"/><br /><sub><b>Manuito</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=Manuito83" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/setcy"><img src="https://avatars.githubusercontent.com/u/86180691?v=4?s=100" width="100px;" alt="setcy"/><br /><sub><b>setcy</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=setcy" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/EArminjon2"><img src="https://avatars.githubusercontent.com/u/92172436?v=4?s=100" width="100px;" alt="EArminjon"/><br /><sub><b>EArminjon</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=EArminjon2" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/ashank-bharati-497989127/"><img src="https://avatars.githubusercontent.com/u/22197948?v=4?s=100" width="100px;" alt="Ashank Bharati"/><br /><sub><b>Ashank Bharati</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=ashank96" title="Code">💻</a></td>
<td align="center"><a href="https://dart.art/"><img src="https://avatars.githubusercontent.com/u/1755207?v=4?s=100" width="100px;" alt="Michael Chow"/><br /><sub><b>Michael Chow</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=chownation" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/RodXander"><img src="https://avatars.githubusercontent.com/u/23609784?v=4?s=100" width="100px;" alt="Osvaldo Saez"/><br /><sub><b>Osvaldo Saez</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=RodXander" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/rsydor"><img src="https://avatars.githubusercontent.com/u/79581663?v=4?s=100" width="100px;" alt="rsydor"/><br /><sub><b>rsydor</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=rsydor" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/hoanglm4"><img src="https://avatars.githubusercontent.com/u/7067757?v=4?s=100" width="100px;" alt="Le Minh Hoang"/><br /><sub><b>Le Minh Hoang</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=hoanglm4" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Miiha"><img src="https://avatars.githubusercontent.com/u/3897167?v=4?s=100" width="100px;" alt="Michael Kao"/><br /><sub><b>Michael Kao</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=Miiha" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/cloudygeek"><img src="https://avatars.githubusercontent.com/u/6059542?v=4?s=100" width="100px;" alt="cloudygeek"/><br /><sub><b>cloudygeek</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=cloudygeek" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/chreck"><img src="https://avatars.githubusercontent.com/u/8030398?v=4?s=100" width="100px;" alt="Christoph Eck"/><br /><sub><b>Christoph Eck</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=chreck" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Ser1ous"><img src="https://avatars.githubusercontent.com/u/4497968?v=4?s=100" width="100px;" alt="Ser1ous"/><br /><sub><b>Ser1ous</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=Ser1ous" title="Code">💻</a></td>
<td align="center"><a href="https://spacelaunchnow.me/"><img src="https://avatars.githubusercontent.com/u/4519230?v=4?s=100" width="100px;" alt="Caleb Jones"/><br /><sub><b>Caleb Jones</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=ItsCalebJones" title="Code">💻</a></td>
<td align="center"><a href="https://sungazer.io/"><img src="https://avatars.githubusercontent.com/u/6215122?v=4?s=100" width="100px;" alt="Saverio Murgia"/><br /><sub><b>Saverio Murgia</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=savy-91" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/tranductam2802"><img src="https://avatars.githubusercontent.com/u/4957579?v=4?s=100" width="100px;" alt="Trần Đức Tâm"/><br /><sub><b>Trần Đức Tâm</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=tranductam2802" title="Code">💻</a></td>
<td align="center"><a href="https://pcqpcq.me/"><img src="https://avatars.githubusercontent.com/u/1411571?v=4?s=100" width="100px;" alt="Joker"/><br /><sub><b>Joker</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=pcqpcq" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/ycv005/"><img src="https://avatars.githubusercontent.com/u/26734819?v=4?s=100" width="100px;" alt="Yash Chandra Verma"/><br /><sub><b>Yash Chandra Verma</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=ycv005" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/arneke"><img src="https://avatars.githubusercontent.com/u/425235?v=4?s=100" width="100px;" alt="Arne Kepp"/><br /><sub><b>Arne Kepp</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=arneke" title="Code">💻</a></td>
<td align="center"><a href="https://omralcrt.github.io/"><img src="https://avatars.githubusercontent.com/u/12418327?v=4?s=100" width="100px;" alt="Ömral Cörüt"/><br /><sub><b>Ömral Cörüt</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=omralcrt" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/albatrosify"><img src="https://avatars.githubusercontent.com/u/64252708?v=4?s=100" width="100px;" alt="LrdHelmchen"/><br /><sub><b>LrdHelmchen</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=albatrosify" title="Code">💻</a></td>
<td align="center"><a href="https://ungapps.com/"><img src="https://avatars.githubusercontent.com/u/8141036?v=4?s=100" width="100px;" alt="Steven Gunanto"/><br /><sub><b>Steven Gunanto</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=gunantosteven" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://schlau.bi/"><img src="https://avatars.githubusercontent.com/u/16060205?v=4?s=100" width="100px;" alt="Michael Rittmeister"/><br /><sub><b>Michael Rittmeister</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=DRSchlaubi" title="Code">💻</a></td>
<td align="center"><a href="https://aakira.app/"><img src="https://avatars.githubusercontent.com/u/3386962?v=4?s=100" width="100px;" alt="Akira Aratani"/><br /><sub><b>Akira Aratani</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=AAkira" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Doflatango"><img src="https://avatars.githubusercontent.com/u/3091033?v=4?s=100" width="100px;" alt="Doflatango"/><br /><sub><b>Doflatango</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=Doflatango" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Eddayy"><img src="https://avatars.githubusercontent.com/u/17043852?v=4?s=100" width="100px;" alt="Edmund Tay"/><br /><sub><b>Edmund Tay</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=Eddayy" title="Code">💻</a></td>
<td align="center"><a href="https://andreidiaconu.com/"><img src="https://avatars.githubusercontent.com/u/1402046?v=4?s=100" width="100px;" alt="Andrei Diaconu"/><br /><sub><b>Andrei Diaconu</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=andreidiaconu" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/plateaukao"><img src="https://avatars.githubusercontent.com/u/4084738?v=4?s=100" width="100px;" alt="Daniel Kao"/><br /><sub><b>Daniel Kao</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=plateaukao" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/xtyxtyx"><img src="https://avatars.githubusercontent.com/u/15033141?v=4?s=100" width="100px;" alt="xuty"/><br /><sub><b>xuty</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=xtyxtyx" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://bieker.ninja/"><img src="https://avatars.githubusercontent.com/u/818880?v=4?s=100" width="100px;" alt="Ben Bieker"/><br /><sub><b>Ben Bieker</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=wwwdata" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/phamnhuvu-dev"><img src="https://avatars.githubusercontent.com/u/22906656?v=4?s=100" width="100px;" alt="Phạm Như Vũ"/><br /><sub><b>Phạm Như Vũ</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=phamnhuvu-dev" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/SebastienBtr"><img src="https://avatars.githubusercontent.com/u/18089010?v=4?s=100" width="100px;" alt="SebastienBtr"/><br /><sub><b>SebastienBtr</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=SebastienBtr" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/fattiger00"><img src="https://avatars.githubusercontent.com/u/38494401?v=4?s=100" width="100px;" alt="NeZha"/><br /><sub><b>NeZha</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=fattiger00" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/klydra"><img src="https://avatars.githubusercontent.com/u/40038209?v=4?s=100" width="100px;" alt="Jan Klinge"/><br /><sub><b>Jan Klinge</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=klydra" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/PauloDurrerMelo"><img src="https://avatars.githubusercontent.com/u/29310557?v=4?s=100" width="100px;" alt="PauloDurrerMelo"/><br /><sub><b>PauloDurrerMelo</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=PauloDurrerMelo" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/benmeemo"><img src="https://avatars.githubusercontent.com/u/47991706?v=4?s=100" width="100px;" alt="benmeemo"/><br /><sub><b>benmeemo</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=benmeemo" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/cinos1"><img src="https://avatars.githubusercontent.com/u/19343437?v=4?s=100" width="100px;" alt="cinos"/><br /><sub><b>cinos</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=cinos1" title="Code">💻</a></td>
<td align="center"><a href="https://xraph.com/"><img src="https://avatars.githubusercontent.com/u/11243590?v=4?s=100" width="100px;" alt="Rex Raphael"/><br /><sub><b>Rex Raphael</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=juicycleff" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Sense545"><img src="https://avatars.githubusercontent.com/u/769406?v=4?s=100" width="100px;" alt="Jan Henrik Høiland"/><br /><sub><b>Jan Henrik Høiland</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=Sense545" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/igtm"><img src="https://avatars.githubusercontent.com/u/6331737?v=4?s=100" width="100px;" alt="Iguchi Tomokatsu"/><br /><sub><b>Iguchi Tomokatsu</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=igtm" title="Code">💻</a></td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

View File

@ -22,7 +22,7 @@ rootProject.allprojects {
apply plugin: 'com.android.library'
android {
compileSdkVersion 31
compileSdkVersion 33
defaultConfig {
minSdkVersion 17
@ -45,9 +45,9 @@ android {
}
}
dependencies {
implementation 'androidx.webkit:webkit:1.4.0'
implementation 'androidx.webkit:webkit:1.5.0'
implementation 'androidx.browser:browser:1.4.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.squareup.okhttp3:okhttp:3.14.9'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
}

View File

@ -23,6 +23,8 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
@ -33,15 +35,11 @@ import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.net.ssl.HostnameVerifier;
@ -333,4 +331,21 @@ public class Util {
}
return data;
}
@Nullable
public static <O> Object invokeMethodIfExists(final O o, final String methodName, Object... args) {
Method[] methods = o.getClass().getMethods();
for (Method method : methods) {
if (method.getName().equals(methodName)) {
try {
return method.invoke(o, args);
} catch (IllegalAccessException e) {
return null;
} catch (InvocationTargetException e) {
return null;
}
}
}
return null;
}
}

View File

@ -288,8 +288,11 @@ final public class InAppWebView extends InputAwareWebView implements InAppWebVie
settings.setAllowFileAccessFromFileURLs(customSettings.allowFileAccessFromFileURLs);
settings.setAllowUniversalAccessFromFileURLs(customSettings.allowUniversalAccessFromFileURLs);
setCacheEnabled(customSettings.cacheEnabled);
if (customSettings.appCachePath != null && !customSettings.appCachePath.isEmpty() && customSettings.cacheEnabled)
settings.setAppCachePath(customSettings.appCachePath);
if (customSettings.appCachePath != null && !customSettings.appCachePath.isEmpty() && customSettings.cacheEnabled) {
// removed from Android API 33+ (https://developer.android.com/sdk/api_diff/33/changes)
// settings.setAppCachePath(customSettings.appCachePath);
Util.invokeMethodIfExists(settings, "setAppCachePath", customSettings.appCachePath);
}
settings.setBlockNetworkImage(customSettings.blockNetworkImage);
settings.setBlockNetworkLoads(customSettings.blockNetworkLoads);
if (customSettings.cacheMode != null)
@ -512,7 +515,11 @@ final public class InAppWebView extends InputAwareWebView implements InAppWebVie
// Disable caching
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
settings.setAppCacheEnabled(false);
// removed from Android API 33+ (https://developer.android.com/sdk/api_diff/33/changes)
// settings.setAppCacheEnabled(false);
Util.invokeMethodIfExists(settings, "setAppCacheEnabled", false);
clearHistory();
clearCache(true);
@ -522,7 +529,11 @@ final public class InAppWebView extends InputAwareWebView implements InAppWebVie
settings.setSaveFormData(false);
} else {
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
settings.setAppCacheEnabled(true);
// removed from Android API 33+ (https://developer.android.com/sdk/api_diff/33/changes)
// settings.setAppCacheEnabled(true);
Util.invokeMethodIfExists(settings, "setAppCacheEnabled", true);
settings.setSavePassword(true);
settings.setSaveFormData(true);
}
@ -533,13 +544,22 @@ final public class InAppWebView extends InputAwareWebView implements InAppWebVie
if (enabled) {
Context ctx = getContext();
if (ctx != null) {
settings.setAppCachePath(ctx.getCacheDir().getAbsolutePath());
// removed from Android API 33+ (https://developer.android.com/sdk/api_diff/33/changes)
// settings.setAppCachePath(ctx.getCacheDir().getAbsolutePath());
Util.invokeMethodIfExists(settings, "setAppCachePath", ctx.getCacheDir().getAbsolutePath());
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
settings.setAppCacheEnabled(true);
// removed from Android API 33+ (https://developer.android.com/sdk/api_diff/33/changes)
// settings.setAppCacheEnabled(true);
Util.invokeMethodIfExists(settings, "setAppCacheEnabled", true);
}
} else {
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
settings.setAppCacheEnabled(false);
// removed from Android API 33+ (https://developer.android.com/sdk/api_diff/33/changes)
// settings.setAppCacheEnabled(false);
Util.invokeMethodIfExists(settings, "setAppCacheEnabled", false);
}
}
@ -788,8 +808,11 @@ final public class InAppWebView extends InputAwareWebView implements InAppWebVie
if (newSettingsMap.get("cacheEnabled") != null && customSettings.cacheEnabled != newCustomSettings.cacheEnabled)
setCacheEnabled(newCustomSettings.cacheEnabled);
if (newSettingsMap.get("appCachePath") != null && (customSettings.appCachePath == null || !customSettings.appCachePath.equals(newCustomSettings.appCachePath)))
settings.setAppCachePath(newCustomSettings.appCachePath);
if (newSettingsMap.get("appCachePath") != null && (customSettings.appCachePath == null || !customSettings.appCachePath.equals(newCustomSettings.appCachePath))) {
// removed from Android API 33+ (https://developer.android.com/sdk/api_diff/33/changes)
// settings.setAppCachePath(newCustomSettings.appCachePath);
Util.invokeMethodIfExists(settings, "setAppCachePath", newCustomSettings.appCachePath);
}
if (newSettingsMap.get("blockNetworkImage") != null && customSettings.blockNetworkImage != newCustomSettings.blockNetworkImage)
settings.setBlockNetworkImage(newCustomSettings.blockNetworkImage);

View File

@ -30,7 +30,7 @@ android {
targetCompatibility 1.8
}
compileSdkVersion 31
compileSdkVersion 33
lintOptions {
disable 'InvalidPackage'
@ -40,7 +40,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.pichillilorenzo.flutter_inappwebviewexample"
minSdkVersion 17
targetSdkVersion 31
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@ -64,6 +64,6 @@ dependencies {
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.android.support:multidex:1.0.3'
}

View File

@ -15,4 +15,4 @@ final TEST_WEB_PLATFORM_URL_3 = Uri.parse(TEST_WEB_PLATFORM_BASE_URL.toString()
final TEST_NOT_A_WEBSITE_URL = Uri.parse('https://www.notawebsite..com/');
final TEST_CHROME_SAFE_BROWSING_MALWARE = Uri.parse('chrome://safe-browsing/match?type=malware');
final TEST_PERMISSION_SITE = Uri.parse('https://permission.site/');
final TEST_SERVICE_WORKER_URL = Uri.parse('https://mdn.github.io/sw-test/');
final TEST_SERVICE_WORKER_URL = Uri.parse('https://mdn.github.io/dom-examples/service-worker/simple-service-worker/');

View File

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>

View File

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

View File

@ -376,7 +376,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -428,7 +428,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@ -459,7 +459,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.pichillilorenzo.flutterinappwebviewExample;
PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview--Example";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -490,7 +490,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.pichillilorenzo.flutterinappwebviewExample;
PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview--Example";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

View File

@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>

View File

@ -24,7 +24,7 @@ dependencies:
cupertino_icons: ^1.0.4
flutter_downloader: ^1.7.3
path_provider: ^2.0.9
permission_handler: ^9.2.0
permission_handler: ^10.0.2
url_launcher: ^6.0.20
# connectivity: ^0.4.5+6
flutter_inappwebview:

View File

@ -454,10 +454,8 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
configuration.preferences.isTextInteractionEnabled = settings.isTextInteractionEnabled
}
if #available(iOS 15.0, *) {
if (configuration.preferences.responds(to: #selector(getter: InAppWebViewSettings.isSiteSpecificQuirksModeEnabled))) {
configuration.preferences.isSiteSpecificQuirksModeEnabled = settings.isSiteSpecificQuirksModeEnabled
}
if #available(iOS 15.4, *) {
configuration.preferences.isSiteSpecificQuirksModeEnabled = settings.isSiteSpecificQuirksModeEnabled
}
}
}
@ -1178,8 +1176,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
let underPageBackgroundColor = newSettings.underPageBackgroundColor, !underPageBackgroundColor.isEmpty {
self.underPageBackgroundColor = UIColor(hexString: underPageBackgroundColor)
}
if configuration.preferences.responds(to: #selector(getter: InAppWebViewSettings.isSiteSpecificQuirksModeEnabled)),
newSettingsMap["isSiteSpecificQuirksModeEnabled"] != nil &&
}
if #available(iOS 15.4, *) {
if newSettingsMap["isSiteSpecificQuirksModeEnabled"] != nil &&
settings?.isSiteSpecificQuirksModeEnabled != newSettings.isSiteSpecificQuirksModeEnabled {
configuration.preferences.isSiteSpecificQuirksModeEnabled = newSettings.isSiteSpecificQuirksModeEnabled
}

View File

@ -143,9 +143,9 @@ public class InAppWebViewSettings: ISettings<InAppWebView> {
}
if #available(iOS 15.0, *) {
realSettings["underPageBackgroundColor"] = webView.underPageBackgroundColor.hexString
if configuration.preferences.responds(to: #selector(getter: self.isSiteSpecificQuirksModeEnabled)) {
realSettings["isSiteSpecificQuirksModeEnabled"] = configuration.preferences.isSiteSpecificQuirksModeEnabled
}
}
if #available(iOS 15.4, *) {
realSettings["isSiteSpecificQuirksModeEnabled"] = configuration.preferences.isSiteSpecificQuirksModeEnabled
}
}
return realSettings

View File

@ -10,8 +10,18 @@ import WebKit
public class UserScript : WKUserScript {
var groupName: String?
private var contentWorldWrapper: Any?
@available(iOS 14.0, *)
lazy var contentWorld: WKContentWorld = WKContentWorld.page
var contentWorld: WKContentWorld {
get {
if let value = contentWorldWrapper as? WKContentWorld {
return value
}
return .page
}
set { contentWorldWrapper = newValue }
}
public override init(source: String, injectionTime: WKUserScriptInjectionTime, forMainFrameOnly: Bool) {
super.init(source: source, injectionTime: injectionTime, forMainFrameOnly: forMainFrameOnly)

View File

@ -985,7 +985,7 @@ class InAppWebViewSettings {
///to improve compatibility with certain known websites. You can disable site-specific quirks
///to help test your website without these workarounds. The default value is `true`.
///
///**NOTE**: available on iOS 15.0+.
///**NOTE**: available on iOS 15.4+.
///
///**Supported Platforms/Implementations**:
///- iOS