Xamarin Form IOS Hybrid Web View and Refresh picture created

ArnaudZIEGLERArnaudZIEGLER USMember ✭✭

Hi everyone,

I have a problem with an hybridwebview which refused to display a picture take with camera.

In android no problem. I take the picture, the file is created and the hybridwebview display it. But on IOs, the file is created (because I can share it on Facebook, Google, etc ... as for Android) but it's like the hybridwebview doesn't find it and so show a html img without src.

It's a problem of a bundle resource ? There is a specific solution to display a bundle resource created in xamarin form for IOs ?

Thanks.

Posts

  • AlmaJensen.9398AlmaJensen.9398 USMember ✭✭✭

    Please don't tell me you're using the hybrid webview from xlabs. If you are the first part of the solution would be to pull it from your project. Xlabs has tons of bugs and it's Hybrid Webview is one of the worst.

    I don't know enough about your project to give you an answer so I'm just going to try and cover what few suggestions that have helped me. I think the best way I know of for a Hybrid Web View would be to use https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/custom-renderer/hybridwebview/

    To help more you're going to need to provide more details, code snippets or something.

  • ArnaudZIEGLERArnaudZIEGLER USMember ✭✭

    Hi AlmaJensen,

    Sorry for my late response.

    Unfortunately Yes, we use HybridWebView from XLabs and Plugin media to take picture...

    I say again that for Android we haven't problem and for IOs, the picture is available to share on Facebook, Twitter, etc ... but the snap is not refresh in the HybridWebView because the folder copy in bundle is like freeze when the app is launch. Even so you create an new file image in the folder copy, this new file is not accessible by app.

    Thanks to a collegue, we have found an another way to refresh snap in the HybridWebView. Simply convert your image source in base64 to solve the problem.

Sign In or Register to comment.