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

How to replace UIWebview into Wkwebview #187

Open
rigorin opened this issue Nov 12, 2018 · 18 comments
Open

How to replace UIWebview into Wkwebview #187

rigorin opened this issue Nov 12, 2018 · 18 comments

Comments

@rigorin
Copy link

rigorin commented Nov 12, 2018

No description provided.

@alphagamer7
Copy link

Bump

@anthonnyc2
Copy link

Is there a solution for this?

1 similar comment
@DocGreenRob
Copy link

Is there a solution for this?

@Moseskhan
Copy link

Is there a solution for this , getting themeable browser to use the wkwebview?

@Moseskhan
Copy link

he following build commands failed:
```
../platforms/ios/MyPad/Plugins/cordova-plugin-themeablebrowser/CDVThemeableBrowser.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
``unknown type name 'CDVUIWebViewDelegate'

This is the error that am getting when doing a build with themeablebrowser plugin installed for ios after updating to wkWebView

@chegewara
Copy link

https://forum.ionicframework.com/t/ionic-4-uiwebview-references/179170/3

Add 1 line to config.xml:

<platform name="ios">
        <preference name="WKWebViewOnly" value="true" />  // <--- this line

@Moseskhan
Copy link

We already implemented that in our config.xml.The problem is when we have the themeable browser added to plugins , the build faills with "`unknown type name 'CDVUIWebViewDelegate' since the themeablebrowser has not been updated to use WkWebView. The question is, How can we update the themeable browser to use WkWebView instead of UIWebView, or which other implementation of showing a browser window with custom buttons i.e with listeners to dropdown custom menu?

@DocGreenRob
Copy link

DocGreenRob commented May 14, 2020

@chegewara @anthonnyc2 @alphagamer7 @rigorin we have fixed the problem... @Moseskhan will share the results... hope it helps... thanks to @Appswage ... from Upwork!!! ... https://www.upwork.com/freelancers/~01bc53d88b1c329db5 ....

@Moseskhan
Copy link

To get this working we edited files in plugins/cordova-plugin-themeable/src/ios
i.e the CDVThemeablebrowser.h and CDVThemeablebrowser.m .

Replace the files with the attached files.

CDVThemeableBrowser.zip

@alphagamer7
Copy link

Thanks for sharing :)

@Appswage
Copy link

The updates was specific and surgical to force WKNavigationDelegate to fire when a page is loaded and for the current URL to be captured. Other delegates still require implementation if needed. Please also note that UIWebView delegation will no longer work so the specific fix found in the files attached above are directed at WKWebView users only.

@numanhaider05
Copy link

Thanks for sharing the solution it will surely help.

@anthonnyc2
Copy link

@Moseskhan thanks for sharing the code. But I have an issue, it seems like the URL is not getting update correctly. I have some listeners when 'loadstart' and 'loadstop', so I track the URL and is returning some weird values. Where can I check/fix that?

@NohohonNohon
Copy link

Thank you for sharing the source code.
I have made the following modifications and additions to the source code I received.
・Merging changes made with a fork https://github.com/grexican/cordova-plugin-themeablebrowser
・Added option to enable swipe back / forward history.(iOS only)
・Fixed a bug that is not displayed in full screen.
・Fixed a bug that the link of new window cannot be displayed.
・Fixed a bug that loadstart,message event does not work.
・Fixed a bug that enableviewportscale and mediaplaybackrequiresuseraction properties do not work.

Not fully tested, but if you are interested please see my fork.
https://github.com/NohohonNohon/cordova-plugin-themeablebrowser

@chaitanyagupta76
Copy link

@NohohonNohon thanks for sharing code but this plugin is not working with cordova ios 6.1.0 can u please help

@chaitanyagupta76
Copy link

chaitanyagupta76 commented Jun 30, 2020

Can anyone help on this plugin please I am using cordova 6.1.0. Having issues with user agent

@NohohonNohon
Copy link

@chaitanyagupta76
I fixed it to work with cordova-ios >6.0.0 on my fork.

@pcrajas
Copy link

pcrajas commented Aug 8, 2020

@chaitanyagupta76 -same issue, got any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests