• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

StageWebView not working on IOS?

New Here ,
Jul 04, 2011 Jul 04, 2011

Copy link to clipboard

Copied

HI,

I have a followed adobes stageWebView example that loads a local html file in a stageWebView, I am using the code to show admob ads...

Well, the project works fine on Android, but on IOS (ipod touch) nothing happens? the stageWebView is just a white rectangle

I am debugging using remote debug, and everything seems fine, the local file url is resolved fine, but after calling the loadurl method nothing happens, I am not getting any events or errors?

I am listening for the following events:

ErrorEvent.ERROR

LocationChangeEvent.LOCATION_CHANGING

LocationChangeEvent.LOCATION_CHANGE

Event.COMPLETE

I have allso tried with loading a online file, but with the same result...

Again, I will mention that the code works perfect on android (HTC Desire).

where do I set the app permissions similar to the android permissions? (I am working in Flash CS 5.5)

Brian
       

TOPICS
Development

Views

3.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 04, 2011 Jul 04, 2011

Copy link to clipboard

Copied

What kind of media does admob load? If it's a swf, it won't be able to work in iOS, because webkit doesn't allow plugin content.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 04, 2011 Jul 04, 2011

Copy link to clipboard

Copied

Hi Colin,  The admob loads javascript and regular images, it renders fine in the ipod touchs native browser.  Here is a online version of the html file: http://www.fiduzen.dk/viewad.html  Thanks for your quick reply, Brian

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 04, 2011 Jul 04, 2011

Copy link to clipboard

Copied

It seems that the source needs to be at a URL for it to work using loadURL(). Maybe it would work on a device and not in test movie? In any case, another way to go, that does work in test movie, is to use loadString(). Try this with your test html embedded in the app:

import flash.net.URLRequest;

import flash.net.URLLoader;

import flash.events.Event;

var webView:StageWebView = new StageWebView();

webView.stage = this.stage;

webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );

var req:URLRequest = new URLRequest("viewad.html");

var ldr:URLLoader = new URLLoader();

ldr.addEventListener(Event.COMPLETE,loaded);

ldr.load(req);

function loaded(e:Event){

webView.loadString(e.target.data)

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 05, 2011 Jul 05, 2011

Copy link to clipboard

Copied

Hi Colin, thanks again for your response.

All my testing is done on the device, using remote debugging through flash cs5.5.

I tried your code, it worked fine on desktop,with the ad showing up, I monitored all the urlloader events doing this test.

When I testet your code on the device the screen was entirely black with no ad, I allso monitored the events here, and they where all the same as on the desktop test? 1 httpStatusEvent status 0, and 1 complete event.

The interresting thing about your code is that the screen rendered black, this could be the background color of the html (the project background is white) in my own attempt the screen was white.

Thanks,

Brian

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

Was there a solution for this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2012 Jul 14, 2012

Copy link to clipboard

Copied

i also would like to know if there is a solution for this. it's really strange, this was working for me on iOS then not. i had the same problems as fiduzen. just a white screen

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 15, 2012 Jul 15, 2012

Copy link to clipboard

Copied

LATEST

Maybe using native extension will help you on your iOS problem. There's one that utilize iOS WebView published here http://darkredz.com/introducing-ios-uiwebview-and-videoplayer-native-extension-for-air-mobile/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines