Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (webview)
Viewing all articles
Browse latest Browse all 680

Webview with facebook or twitter JS SDK causes white page on iOS

$
0
0

Our app uses some webviews which show some pages of our mobile website. Always worked fine until now. Pages didn't load anymore; they would give a flash of the content, but then turned white.

After removing all lines of code I ended up with some javascript code (twitter and facebook share buttons and the SDK initialisation code that is required. This was the cause; when I removed it the page loads fine again.

This is the code:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=XXXXXXXX";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Platform: iOS SDK: 3.2.1 (also tested on latest build from THU JAN 30, 2014)

Anyone got a clue?


Viewing all articles
Browse latest Browse all 680

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>