Bug 28778 - Frequent page refreshes (and also app crashes) in iOS when using WebViewRenderer
Summary: Frequent page refreshes (and also app crashes) in iOS when using WebViewRenderer
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 1.4.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-04-04 20:23 UTC by makif_cakar
Modified: 2017-01-04 17:50 UTC (History)
4 users (show)

Tags: ios webview customrenderer
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description makif_cakar 2015-04-04 20:23:13 UTC
When we implement custom WebViewRenderer or accessing it via (WebViewRenderer)RendererFactory.GetRenderer( browser refreshes itself so frequently. If we force to use browser it may cause app crash.

Note: this only happens in tamarin forms iOS project. No problem with windows phone etc.
Comment 2 Chris King 2015-05-27 17:07:34 UTC
We'd be happy to help you resolve this issue. Please help us by attaching a reduced reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue. If you'd do this for us we would very much appreciate it. If you are able to reproduce the issue without modifying the platform specific projects that would eliminate a number of possibilities and likely expedite a resolution. If you need to create a custom renderer instead of submitting that code please explain why the existing forms classes don't work for you.

Warm regards,
Xamarin Forms Team
Comment 3 makif_cakar 2015-05-28 16:58:12 UTC
Hi Chris;
   I've provided a sample project in comment 2. Which is a clean xamarin.forms project (It has just a few lines of code). If you comment line 16 in "WebViewRenderer = (WebViewRenderer)RendererFactory.GetRenderer(basePageInstance.webView);" MainPageRenderer.cs (iOS project) it may work well.

Actually I don't need custom renderer in my current project. I just need to access platform equivalent of xamarin.forms controls. WebView doesn't provide a function to get html of current web page but UIWebView in iOS has some functions for that requirement. Is there any other way to cast xamarin.forms control to platform specific control.
Comment 4 Rui Marinho 2017-01-04 17:50:02 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction. 

For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d 

Warm regards,
Xamarin Forms Team