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

Support for WKWebView #90

Closed
ramezrafla opened this issue Nov 22, 2015 · 27 comments
Closed

Support for WKWebView #90

ramezrafla opened this issue Nov 22, 2015 · 27 comments

Comments

@ramezrafla
Copy link

The next generation of IOS browser is out:
https://developer.apple.com/library/ios/documentation/WebKit/Reference/WKWebView_Ref/

Does this plugin support this type of webview (instead of UIView)? Or can we at least coexist (i.e. if we run cordova within wkwebview instead of UIView?)

Thanks

@saghul
Copy link
Collaborator

saghul commented Nov 22, 2015

You'll need to wait for the Cordova iOS platform 4.0, which allows to choose the type of webview required. The plugin will need to be updated, but changes are minimal, I made them here: https://github.com/saghul/cordova-plugin-iosrtc/tree/ios-platform-4

@yocontra
Copy link

You can also use this for the interim: https://github.com/Telerik-Verified-Plugins/WKWebView

@ibc
Copy link
Collaborator

ibc commented Nov 26, 2015

Would be something like this enough to achieve the goal of this issue?

alongubkin/phonertc@e94c680

@saghul
Copy link
Collaborator

saghul commented Nov 26, 2015

See my patch. That does it, but 4.0.0 is not out yet.
On Nov 26, 2015 21:36, "Iñaki Baz Castillo" [email protected]
wrote:

Would be something like this enough to achieve the goal of this issue?

alongubkin/phonertc@e94c680
alongubkin/phonertc@e94c680


Reply to this email directly or view it on GitHub
#90 (comment)
.

@ibc
Copy link
Collaborator

ibc commented Nov 27, 2015

Nide, so let's wait for 4.0.0 before you send such a PR :)

@ballenjr
Copy link

@yocontra
Copy link

@saghul Got time to send a PR for this now that 4.0 is out? 🍾

@saghul
Copy link
Collaborator

saghul commented Dec 21, 2015

Oh, looks like it was released 8 december, indeed: https://cordova.apache.org/announcements/2015/12/08/cordova-ios-4.0.0.html

I'll make a PR soon.

@saghul
Copy link
Collaborator

saghul commented Dec 21, 2015

I updated my branch (https://github.com/saghul/cordova-plugin-iosrtc/tree/ios-platform-4) so it compiles now, but my app is behaving weirdly, so I haven't been able to test this properly yet.

@saghul
Copy link
Collaborator

saghul commented Dec 21, 2015

This is completely bizarre, none of my plugins load and the debugger gets disconnected automagically after updating to iOS platform 4.0.1. Sigh.

@saghul
Copy link
Collaborator

saghul commented Dec 21, 2015

Ok, managed to launch the app with a WKWebView and the plugin, but now it crashes when trying to make a call, somewhere inside the iosrtc plugin. Fun times ahead, I guess.

@ibc
Copy link
Collaborator

ibc commented Dec 22, 2015

Does such a crash just happen with your "WKWebView" based fork?

@saghul
Copy link
Collaborator

saghul commented Dec 22, 2015

Yep.

@ibc
Copy link
Collaborator

ibc commented Dec 22, 2015

happy christmas anyway!

@saghul
Copy link
Collaborator

saghul commented Dec 22, 2015

Good / bad news: the crash also happens when NOT using a WKWebView, so it seems related to the iOS platform upgrade to 4.0.0.

@ibc
Copy link
Collaborator

ibc commented Dec 22, 2015

Are you 100% sure it is not a fucking "memory warning" upgraded to "iOS killed me due to memory usage"? I've seen TONS of them, and usually they are not related to the iosrtc plugin, but to the usage of some cool CSS transition effect or too much loaded images.

@saghul
Copy link
Collaborator

saghul commented Dec 22, 2015

Yeah, pretty sure. I get some EXC_BAD_ACCESS when doing a getUserMedia, on the first line in saveMediaStream.

@ibc
Copy link
Collaborator

ibc commented Dec 22, 2015

You are not calling that within a WebSocket event, right?

@saghul
Copy link
Collaborator

saghul commented Dec 22, 2015

No, though I do for incoming calls. I do have the hack applied though. It works right now, so I'm trying to figure out what the problem could be...

@telemakhos
Copy link

Just FYI: this is also being re-worked and close to completion here. Both UIWebView and WKWebView seem to be working, including fixes for the HTML/transparency trick...

@mark-veenstra
Copy link
Contributor

@ibc @saghul is there still work going on to get WKWebView working?

@ibc
Copy link
Collaborator

ibc commented Mar 22, 2016

@telemakhos thanks for that useful link. It seems that some work must be done in order to use Cordova iOS 4.0.0.

@mark-veenstra I cannot spend time on this. @saghul already did some work. The remaining work seems doable by following same steps as those done here. Pull requests are welcome in the meanwhile.

@saghul
Copy link
Collaborator

saghul commented Mar 23, 2016

@mark-veenstra if you look at the PR I sent, the changes required to make it build are very small. Unfortunately I have no clue why it randomly crashed. But it looked similar to #144. Feel free to apply saghul@90a7c35 on top of master and try to debug it...

@mark-veenstra
Copy link
Contributor

I have applied the patch from @saghul to the current master (which includes the fix). But I still encounter a EXC_BREAKPOINT on this line.

I have read the steps from here, but I don't see where it is used in iosrtc. Any ideas?

EDIT:
Seems like you still need to install cordova-plugin-wkwebview-engine seperately, but I still encounter the file:// issues with WKWebView.

@ibc
Copy link
Collaborator

ibc commented Apr 14, 2016

The plugin has been updated to Cordova iOS 4, so let's this game continue.

@saghul
Copy link
Collaborator

saghul commented Apr 25, 2016

@ibc I believe you can close this one.

@ibc
Copy link
Collaborator

ibc commented Apr 25, 2016

OK, so this will be available in 3.0.0.

@ibc ibc closed this as completed Apr 25, 2016
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

7 participants