Hacker News new | past | comments | ask | show | jobs | submit login

This is news to me. I thought WkWebview used the same internals as mobile safari. So it's just the JS engine/Nitro that's the same?



I'm not even sure what is the same and what is different, and there isn't anywhere that I found that explains it easily (if it can even be explained easily).

I think the difference might just be in the rendering engine. So Safari uses "safari", and WkWebView uses straight WebKit? But even that isn't true since there are things that WkWebViews support that WebKit doesn't...

But there are many differences between them. The WebRTC stuff above as one, but also things like appcache manifest stuff didn't work in WkWebView in iOS 9 (even though it worked in Safari). And that violation was especially egregious because it could be enabled by calling a single private Objective-C method like this

     [_wkWebView.configuration.preferences _setOfflineApplicationCacheIsEnabled:YES];

However apple would then deny your app in the app store if you did that...

So I genuinely don't know what to think.

Oh, and SFSafariViewController won't even save you, as that doesn't support WebRTC either...


Well that sucks. Thanks a lot for the info.


No problem, hopefully you don't get caught with your pants down like I did.

I forgot to actually test that a proof-of-concept of a new feature using WebRTC in a WebView until it was already like 70% done. I heard it worked in iOS 11, I tried it in safari and developed it like that, then once I started more in depth testing and integration I saw the problem.

So now I make sure I test everything in a WebView (if needed), as an "added to homescreen" web app, and as a safari tab ASAP.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: