9

Wondering what the best approach is to read HTML/JS within a webview in a native app that works for:

  • iOS
  • Android
  • Windows Phone

Can all three platforms read the content of a web view, or does the sandbox prevent that from happening?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
El-codino
  • 107
  • 1
  • 1
  • 7
  • Please have a look for iOS http://stackoverflow.com/questions/15537320/invoke-method-in-objective-c-code-from-html-code-using-uiwebview/15541607#15541607 – Vinodh Jan 27 '14 at 11:10
  • Thanks - really helpful. I'm still checking if this works on Windows Phone 8 platform and will share anything that I find. – El-codino Jan 31 '14 at 13:44
  • El-codino what did you find? – SAHM May 27 '14 at 03:47

2 Answers2

-1

On iOS you can fairly easy communicate with web view injecting some JS. In opposite direction calling messages is a bit more complicated, but still possible, when you create a kind of bridge between JS and iOS.

I think on Android is probably easier. Don't know about Windows Phone.

El-codino
  • 107
  • 1
  • 1
  • 7
Maciej Oczko
  • 1,225
  • 8
  • 11