-
Notifications
You must be signed in to change notification settings - Fork 889
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
fix(ios): re-implement user agent overwrite #268
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Great stuff, any chance of getting this pushed to npm, so we can start using it? |
We don’t give ETAs on new releases, but as you can see we have resumed development of this plugin. There is a lot of testing and cleanup to do though.
…Sent from my iPhone
On 27. Aug 2020, at 9:27 AM, Martin Bech ***@***.***> wrote:
Great stuff, any chance of getting this pushed to npm, so we can start using it?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
+1 to a fast release, as this is blocking builds. |
@timbru31 this appears to break adding all the configured headers for me. My assumption is that this call does not block untill the completionHandler is executed.
I looked at https://developer.apple.com/documentation/webkit/wkwebview/1415017-evaluatejavascript but it does not indicate tell if it blocks till the completionHandler has run. EDIT: I've added some NSLog statements and indeed it does not block when calling evaluateJavascript. |
Thanks for investigating, I'll take a look. |
That is a quick reply :) I was considering moving the userAgent determination to the plugin is initialization. |
Are you willing to prepare a PR for that? 👍 |
Seems that is also not possible. Since pluginInitialize is synchronous the same problem can occur. Since the headers can be set from javascript, including the |
I've looked at the Android and Windows implementation, both do not add the User-Agent header in the plugin code. Am I missing something or can it just be removed? |
I've created #284 for this issue. |
* Add or update GitHub pull request and issue template * docs: undeprecate the plugin (apache#267) Co-authored-by: エリス <erisu@users.noreply.github.com> * fix(ios): re-implement user agent overwrite (apache#268) This closes apache#263 apache#258 * chore(npm): adds ignore list (apache#269) * fix!: remove deprecated platforms (apache#270) * chore: bump version to 2.0.0-dev (apache#273) * chore: package cleanup (apache#272) * refactor(eslint): use cordova-eslint /w fix (apache#275) * chore: adds package-lock file (apache#274) * doc: Improve progressEvent documentation (apache#280) Co-authored-by: Jan Piotrowski <piotrowski+git@gmail.com> Co-authored-by: Tim Brust <github@timbrust.de> Co-authored-by: エリス <erisu@users.noreply.github.com> Co-authored-by: Norman Breau <norman@normanbreau.com>
This closes apache#263 apache#258 (cherry picked from commit 64bfd15)
This closes #263
This closes #258
Platforms affected
iOS
Motivation and Context
This solves the issue in #258 and makes the plugin compatible with cordova-ios@6.
It also re-implements the user agent overwrite.
Description
Sadly, there is no "nice" way to obtain the WKWebView user agent other than evaluating JavaScript.
Testing
My local fork compiles and has the correct user agent attached when making the network requests.
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)