Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webview darwin proxy #8311

Draft
wants to merge 220 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
c432fd0
generate proxy apis
bparrishMines Nov 11, 2024
5948bf4
start of trying to get swift to work
bparrishMines Nov 16, 2024
f75f6b1
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Nov 16, 2024
859c3d3
configure fixed it
bparrishMines Nov 16, 2024
5496891
formatted code
bparrishMines Nov 16, 2024
999bf22
save these files i think
bparrishMines Nov 16, 2024
b5930f8
remove modulemap
bparrishMines Nov 16, 2024
913b245
compiling code
bparrishMines Nov 16, 2024
9dbf0a5
create a wrapper for urlrequest
bparrishMines Nov 16, 2024
5050376
maybe finish controller
bparrishMines Nov 19, 2024
5135ffe
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Nov 20, 2024
24f601f
start work on fixing tests
bparrishMines Nov 20, 2024
2d7b482
fix some tests
bparrishMines Nov 20, 2024
e1281ba
fix navigation delegate tests
bparrishMines Nov 20, 2024
13dbc4d
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Nov 21, 2024
bee1811
w;oiefj
bparrishMines Nov 21, 2024
ff64f90
mock
bparrishMines Nov 21, 2024
419a2eb
half of the tests
bparrishMines Nov 21, 2024
1740a29
some more test fixes
bparrishMines Nov 22, 2024
389788e
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Nov 22, 2024
40ae802
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Nov 22, 2024
13fc34c
more test fixes
bparrishMines Nov 22, 2024
b15cdde
finish controller tests
bparrishMines Nov 22, 2024
7dcc650
cookie manager tests
bparrishMines Nov 22, 2024
0d22adf
widget tests
bparrishMines Nov 22, 2024
a35c48e
fix legacy implementation
bparrishMines Nov 22, 2024
f0fc827
legacy cookie tests
bparrishMines Nov 22, 2024
e6fe379
first test in webview widget passed
bparrishMines Nov 22, 2024
6494a65
initial url test
bparrishMines Nov 24, 2024
07f3410
more fixed tests
bparrishMines Nov 24, 2024
3ad8d9f
websettings tests
bparrishMines Nov 24, 2024
85fa2b2
more test fixes
bparrishMines Nov 24, 2024
98aee69
fix all unit tests
bparrishMines Nov 24, 2024
f0b0a94
some swift
bparrishMines Nov 26, 2024
cbc0856
fix errors
bparrishMines Nov 26, 2024
b863f4d
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Nov 26, 2024
fa4c951
fix nullability
bparrishMines Nov 26, 2024
49a1a05
navigation response impl
bparrishMines Nov 26, 2024
5e5781f
error and frame info
bparrishMines Nov 26, 2024
97d6e96
more impl
bparrishMines Nov 26, 2024
bf679bf
cookie impl
bparrishMines Nov 26, 2024
ebe0ba9
cookies authchallenge and websitedatastore impl
bparrishMines Nov 26, 2024
7eb6fdf
uiview impl
bparrishMines Nov 26, 2024
f93a7cc
wkwebbviewconfiguration impl
bparrishMines Nov 26, 2024
b485d72
user content controller impl
bparrishMines Nov 26, 2024
7d39659
WKPreferences impl
bparrishMines Nov 26, 2024
f6a041b
script message handler
bparrishMines Nov 26, 2024
a566208
new file
bparrishMines Nov 26, 2024
ec576a4
navigation delegate
bparrishMines Nov 27, 2024
068942a
nsobject impl
bparrishMines Nov 27, 2024
612ceb8
webview ui extensions
bparrishMines Nov 27, 2024
edcd528
webview impl
bparrishMines Nov 27, 2024
f204985
wkuidelegate impl
bparrishMines Nov 27, 2024
c63fa97
cookie store impl
bparrishMines Nov 27, 2024
fcd8b6a
scrollviewdelegate impl
bparrishMines Nov 27, 2024
54043b4
credential impl
bparrishMines Nov 27, 2024
869da71
protection space
bparrishMines Nov 27, 2024
c922725
url auth challenge impl
bparrishMines Nov 27, 2024
41b9e19
url impl
bparrishMines Nov 27, 2024
81fd166
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Nov 27, 2024
daf7e50
fix int
bparrishMines Nov 27, 2024
54bfff1
change plugin file
bparrishMines Nov 27, 2024
f14a81e
fix platform registry name
bparrishMines Nov 27, 2024
b41c21e
may fix for webview
bparrishMines Nov 28, 2024
349c0f7
actually use URL
bparrishMines Nov 28, 2024
d512f44
use platform webview as solution
bparrishMines Nov 29, 2024
d494275
fix macos webview
bparrishMines Nov 29, 2024
bfa91ce
maybe fix http response
bparrishMines Nov 29, 2024
bff9db6
handle null just in case
bparrishMines Nov 29, 2024
0cdf137
fix loadfileurl
bparrishMines Nov 29, 2024
3d76c72
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Nov 29, 2024
c236616
fix test classes
bparrishMines Nov 30, 2024
5190205
fix integration tests
bparrishMines Nov 30, 2024
00d1ecd
formatting
bparrishMines Nov 30, 2024
dd70fa2
fix gc test
bparrishMines Nov 30, 2024
a080026
remove ocmock and write first test
bparrishMines Nov 30, 2024
668cdeb
error tests
bparrishMines Nov 30, 2024
8816103
fix test class name
bparrishMines Nov 30, 2024
1b23304
add innate webview settings
bparrishMines Nov 30, 2024
ffb8b9c
frame info tests
bparrishMines Nov 30, 2024
c0e5ab3
fix all current tests
bparrishMines Dec 3, 2024
a302eb2
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Dec 3, 2024
38c43a2
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Dec 3, 2024
d4acfda
cookie store tests
bparrishMines Dec 3, 2024
88dc3bc
navigation action tests
bparrishMines Dec 3, 2024
882504d
navigation delegate tests pass
bparrishMines Dec 4, 2024
943d55c
uncomment tests i guess
bparrishMines Dec 4, 2024
ae8dc8c
navigation response tests
bparrishMines Dec 4, 2024
9981881
comment out frame info
bparrishMines Dec 4, 2024
0db825e
update code generation
bparrishMines Dec 4, 2024
66b37e9
nsobject tests
bparrishMines Dec 4, 2024
6ebba32
preferences test
bparrishMines Dec 4, 2024
edabb71
script message handler tests
bparrishMines Dec 4, 2024
e488ab4
script message tests
bparrishMines Dec 4, 2024
e01b4b0
scrollview delegate tests
bparrishMines Dec 4, 2024
8ce00bb
scroll view tests
bparrishMines Dec 4, 2024
88df578
securityorigin tests
bparrishMines Dec 4, 2024
64a9c4d
help have tests pass
bparrishMines Dec 4, 2024
ff705af
ui delegate tests
bparrishMines Dec 5, 2024
2474f2f
uiview tests
bparrishMines Dec 5, 2024
babc179
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Dec 5, 2024
56083c5
fix frame
bparrishMines Dec 5, 2024
973e2be
URLAuthenticationChallenge tests
bparrishMines Dec 5, 2024
1d43b03
URLCredential tests
bparrishMines Dec 5, 2024
d03f8fc
protection space tests
bparrishMines Dec 5, 2024
53d8aef
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Dec 6, 2024
50c3e76
url request wrapper tests
bparrishMines Dec 6, 2024
e251caa
usercontent controller tess
bparrishMines Dec 6, 2024
a3eed42
user scripts tests
bparrishMines Dec 6, 2024
c016464
fix legacy names and website data store tests are broken
bparrishMines Dec 11, 2024
3004001
fix tests
bparrishMines Dec 11, 2024
52cae3a
webview configuration tests
bparrishMines Dec 11, 2024
3c14d7f
fix inspectable
bparrishMines Dec 11, 2024
ec28dae
some tests for wkwebview
bparrishMines Dec 11, 2024
30b49a3
fix flutter asset test
bparrishMines Dec 11, 2024
f91b734
can go back tests
bparrishMines Dec 11, 2024
f883a5b
finish webview tests
bparrishMines Dec 11, 2024
538e24b
no printing
bparrishMines Dec 11, 2024
47afa83
fix cookie store call
bparrishMines Dec 11, 2024
701ab08
improve cookie test
bparrishMines Dec 11, 2024
3a59e7e
add default handling for uidelegate and navigation delegate and forma…
bparrishMines Dec 11, 2024
d8b7c83
configuration for macos
bparrishMines Dec 11, 2024
793ef57
ensure external api still works
bparrishMines Dec 12, 2024
787df3e
remove flutter imports
bparrishMines Dec 12, 2024
9b8548b
fix cookie tests
bparrishMines Dec 12, 2024
f5ec093
change expect name
bparrishMines Dec 12, 2024
ad3d45c
update auth challenge response
bparrishMines Dec 13, 2024
9242d92
add null constructor error
bparrishMines Dec 13, 2024
bd54c6d
navigation delegate and above
bparrishMines Dec 13, 2024
4c39451
update up to nsobject
bparrishMines Dec 13, 2024
3291608
uiscrollviews
bparrishMines Dec 13, 2024
ab9210e
struct wrappers
bparrishMines Dec 13, 2024
20e9791
wkuidelegate and fix other callback stuff
bparrishMines Dec 13, 2024
a4b2c85
up to URL
bparrishMines Dec 13, 2024
ddadc15
url request
bparrishMines Dec 13, 2024
fb0bc68
rest of classes
bparrishMines Dec 13, 2024
4fb75b6
update docs for proxyapidelegate
bparrishMines Dec 13, 2024
109fb15
improve error message
bparrishMines Dec 13, 2024
814b33f
start of test fixes
bparrishMines Dec 15, 2024
79e57a8
move to proxy api registrar holding the helper methods
bparrishMines Dec 15, 2024
e42c018
create a test registrar
bparrishMines Dec 16, 2024
1f24e57
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Dec 16, 2024
ec50474
cleanup tests
bparrishMines Dec 16, 2024
c8417c6
tests run
bparrishMines Dec 16, 2024
25d90fd
fixed tests
bparrishMines Dec 16, 2024
de9f446
working on macos
bparrishMines Dec 16, 2024
3e6f3cf
remove unsused file and change pigeon file name
bparrishMines Dec 16, 2024
ab4dac6
non helper generation
bparrishMines Dec 16, 2024
fb0649c
formatting
bparrishMines Dec 16, 2024
8f98ec1
formatting and lint
bparrishMines Dec 16, 2024
80588ac
add contribution
bparrishMines Dec 16, 2024
6b9f199
start docs for platform webview
bparrishMines Dec 16, 2024
1e16ac4
use long
bparrishMines Dec 16, 2024
44c8bc0
forward method impl
bparrishMines Dec 16, 2024
f1c874b
scrollview tests
bparrishMines Dec 16, 2024
48b3d4d
finish docs
bparrishMines Dec 16, 2024
05f4fcd
fix analyze warnings
bparrishMines Dec 16, 2024
d2c657b
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Dec 16, 2024
7fb5ac4
compilation on mac
bparrishMines Dec 16, 2024
3a477c3
formatting
bparrishMines Dec 16, 2024
449930a
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Dec 16, 2024
2a9896f
version bump
bparrishMines Dec 16, 2024
11a3d90
fix change
bparrishMines Dec 16, 2024
0096db3
use value and not argb32
bparrishMines Dec 17, 2024
48957f7
remove cocoapods
bparrishMines Dec 17, 2024
d707b60
try removing pods again
bparrishMines Dec 17, 2024
afa75fd
reremove old stuff
bparrishMines Dec 17, 2024
5098045
work with swift package manager
bparrishMines Dec 17, 2024
e5bab49
maybe
bparrishMines Dec 17, 2024
8a0c9e2
add main actor
bparrishMines Dec 17, 2024
7806985
set swift version to 5
bparrishMines Dec 17, 2024
0a81947
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Dec 17, 2024
082e628
use swift 5 in tests
bparrishMines Dec 17, 2024
7b06141
fix lint errors
bparrishMines Dec 17, 2024
beed9f5
fix macos maybe lol
bparrishMines Dec 17, 2024
a0c595f
fix native tests hopefully
bparrishMines Dec 18, 2024
0763edb
docs for external api
bparrishMines Dec 18, 2024
86bc1a2
remove use of any
bparrishMines Dec 18, 2024
ef63401
try fix last syntax error
bparrishMines Dec 18, 2024
183d263
remove old test references on mac
bparrishMines Dec 18, 2024
8b1b448
try fix lint
bparrishMines Dec 18, 2024
adcc442
try fix again
bparrishMines Dec 18, 2024
19af387
try fix objc tag
bparrishMines Dec 18, 2024
7f01bd1
lint fixes
bparrishMines Dec 18, 2024
dc138c4
remove the any usages
bparrishMines Dec 18, 2024
9dcf6f2
hopefully last any
bparrishMines Dec 18, 2024
9e3b41e
make public i guess lol
bparrishMines Dec 19, 2024
eff8031
make class public
bparrishMines Dec 19, 2024
98bab3e
sofeja
bparrishMines Dec 19, 2024
2cb82a2
move method to extension
bparrishMines Dec 19, 2024
230bdac
move methods to extension
bparrishMines Dec 19, 2024
a2f9cd5
remove
bparrishMines Dec 19, 2024
7aa551b
try changing using import
bparrishMines Dec 19, 2024
f6df68b
poqwiejfpwoiej doewijaeo;isj;s
bparrishMines Dec 19, 2024
0fccbdc
move
bparrishMines Dec 19, 2024
fc57cbf
uaoijepfaeoija
bparrishMines Dec 19, 2024
9eeabc7
ui delegate
bparrishMines Dec 19, 2024
6a8c6ae
remove mainactor
bparrishMines Dec 19, 2024
644c204
try to main thread
bparrishMines Dec 19, 2024
56d57b4
fix uidlegate
bparrishMines Dec 19, 2024
4c38801
user dispatch on main thread again
bparrishMines Dec 19, 2024
d20fbcf
expectations from
bparrishMines Dec 19, 2024
129aeda
fix swift unit tests
bparrishMines Dec 19, 2024
d9bd5b2
try add h and removing use frameworks
bparrishMines Dec 20, 2024
6ac9d27
add to runner
bparrishMines Dec 20, 2024
57065b7
woe;ifj
bparrishMines Dec 20, 2024
900786b
owiejf;a
bparrishMines Dec 20, 2024
0cad230
delete
bparrishMines Dec 20, 2024
700af73
add reference files
bparrishMines Dec 20, 2024
7dfb124
Merge branch 'main' of github.com:flutter/packages into webview_darwi…
bparrishMines Dec 20, 2024
04384e3
newline
bparrishMines Dec 20, 2024
d3811a6
move files
bparrishMines Dec 20, 2024
b609bc4
maybe fix tests again
bparrishMines Dec 20, 2024
95b6cc5
any again
bparrishMines Dec 20, 2024
122524c
faoiwej
bparrishMines Dec 20, 2024
9f4de6b
alternative to main actor
bparrishMines Dec 21, 2024
926f4d0
use ifdefs for xcode 5.0
bparrishMines Dec 21, 2024
8ae290e
fix legacy
bparrishMines Dec 21, 2024
46bc96b
values yo
bparrishMines Dec 21, 2024
d335c3a
fix mocks
bparrishMines Dec 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 3.17.0

* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
* Updates internal API wrapper to use ProxyApis.

## 3.16.3

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Contributing to `webview_flutter_wkwebview`

Please start by taking a look at the general guide to contributing to the `flutter/packages` repo:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md

## Package Structure

This plugin serves as a platform implementation plugin as outlined in [federated plugins](https://docs.flutter.dev/packages-and-plugins/developing-packages#federated-plugins).
The sections below will provide an overview of how this plugin implements this portion with Android.

For making changes to this package, please take a look at [changing federated plugins](https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins).

### Quick Overview

This plugin implements the platform interface provided by `webview_flutter_platform_interface` using
the native WebKit APIs for Android.

#### SDK Wrappers

To access native APIS, this plugins uses Dart wrappers of the native library. The native library is
wrapped using using the `ProxyApi` feature from the `pigeon` package.

The wrappers for the native library can be updated and modified by changing `pigeons/web_kit.dart`.

The generated files are located:
* `lib/src/common/web_kit.g.dart`
* `darwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/WebKitLibrary.g.swift`

To update the wrapper, follow the steps below:

##### 1. Ensure the project has been built at least once

Run `flutter build ios --simulator` in `example/`.

##### 2. Make changes to the respective pigeon file that matches the native SDK

* WebKit Dependency: https://developer.apple.com/documentation/webkit
* Pigeon file to update: `pigeons/web_kit.dart`

##### 3. Run the code generator from the terminal

Run: `dart run pigeon --input pigeons/web_kit.dart`

##### 4. Update the generated APIs in native code

Running the `flutter build` command from step 1 again should provide build errors and indicate what
needs to be done. Alternatively, it can be easier to update native code with the platform's specific
IDE:

Open `example/android/` in a separate Android Studio project.

##### 5. Write API tests

Assuming a non-static method or constructor was added to the native wrapper, a native test will need
to be added.

Tests location: `darwin/Tests`
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@ Objective-C:

Then you will have access to the native class `FWFWebViewFlutterWKWebViewExternalAPI`.

## Contributing

For information on contributing to this plugin, see [`CONTRIBUTING.md`](CONTRIBUTING.md).

[1]: https://pub.dev/packages/webview_flutter
[2]: https://flutter.dev/to/endorsed-federated-plugin

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading