2

Really struggling to find an active solution that would enable 2 way communication between monotouch (c#) to uiwebview.

Android seems to do this well with JavaScriptInterface.

(Trying to get leaflet.js working inside a Xamarin IOS uiwebview component with geojson downloaded so i can populate leaflet.js sitting in the uiwebview and also listen to js callbacks from native side).

fractal
  • 1,649
  • 17
  • 31

1 Answers1

4

See this sample:

https://github.com/xamarin/mobile-samples/tree/master/ContentControls

And previous questions on StackOverflow:

How I can call a javascript function with MonoTouch and vice versa?

MonoTouch UIWebView and EvaluateJavascript

Or full blog posts:

http://yobriefca.se/blog/2011/12/05/rolling-your-own-phonegap-with-monotouch/

Community
  • 1
  • 1
miguel.de.icaza
  • 32,654
  • 6
  • 58
  • 76
  • Thanks Miguel. Would be great if the Mapbox IOS SDK got officially converted for monotouch in full, at some point. :) – fractal Mar 30 '13 at 09:37