EXAMPLE: WebView iOS

You need to run these examples in iOS simulator or real device, local preview wont work. If you are using iOS9 you have to add ATS handling to your xCode project, read more here: http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/

“Basic” theme:

<App Theme="Native">
  <GraphicsView Background="#fff">
      <Fuse.BasicTheme.BasicStyle />
      <DockPanel>
          <StatusBarBackground Dock="Top" />
          <Panel Dock="Fill">
              <WebView Url="http://www.fusetools.com">
                  <NativeViewHost>
                      <iOS>
                          <iOS.WebView />
                      </iOS>
                  </NativeViewHost>
              </WebView>
          </Panel>
      </DockPanel>
  </GraphicsView>
</App>


“Native” theme:

<App Theme="Native">
    <DockPanel>
        <WebView Url="http://www.fusetools.com" />
    </DockPanel>
</App>

Thank you for the example. This will clarify things for a lot of people :slight_smile:

Adding this in the NativeViewHost tag will give Android webview aswell.

<Android>
    <Android.WebView />
</Android>

And also do not forget to add these package references Fuse.iOS Fuse.Android Fuse.Android.Views

I used webview. but it didn’t render map site. (ex: https://www.google.com/maps) Doesn’t it support javascript?

The current version of WebView does not support JavaScript, but we are working on expanding our WebView API and JavaScript is part of that :slight_smile:

I have updated fuse to latest version i.e. 0.9.6, and trying using Basic Theme example as shown above. I also added Fuse.iOS,Fuse.Android and Fuse.Android.Views packages but on Fuse.Android.Views and Android.WebView. I am getting an error. I added these packages in .unoproj file.I want to use TextInput and WebView on same page.I could not get any explanation in documentation. Please help me out.

Hi!

The example above is deprecated. Take a look at the learn section for up to date documentation on WebView:

https://www.fusetools.com/learn/fuse#keyword-webview

Thanks for the reply. Fuse blog helped me out and was a prefect solution. But now I want to use Google Place API (Autocomplete and Place Detail) but there is no way to add Javascript from Url (https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places). I tried doing the same using WebView, but that did not helped me as I could not interact/bind with WebView and Fuse JS. Please help if there is some other way/solution for the problem.