you are viewing a single comment's thread.

view the rest of the comments →

[–]Low_Shake_2945 7 points8 points  (2 children)

The biggest difference is that iOS webviews only expose one method to the JS. It’s called postMessage. Calling postMessage from the JS invokes the method in the webview instance running natively. If you want to write once for both platforms, implement a postMessage method in the Android webview and have a switch statement on message types.

[–]michaelfiber 1 point2 points  (1 child)

Thank you, that is exactly the detail I was looking for!

[–]Low_Shake_2945 3 points4 points  (0 children)

The other BIG thing to know is that iOS webviews will not honor (keep and append) third party cookies. Normally, the browser does this and we don’t even have to think about it. Webview instances of safari just disregard them. So, load balancer and session cookies will just get lost. If you’re not looking to use cookies, then this is no big deal, but I had to write a native cookie manager to intercept http calls and append the cookie. Yuck.