Skip navigation
fiduzen
Currently Being Moderated

StageWebView not working on IOS?

Jul 4, 2011 1:53 PM

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
       

 
Replies
  • Currently Being Moderated
    Jul 4, 2011 2:07 PM   in reply to fiduzen

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 4, 2011 2:52 PM   in reply to fiduzen

    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)

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2011 11:09 AM   in reply to fiduzen

    Was there a solution for this?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 14, 2012 6:04 PM   in reply to DachFlach

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 15, 2012 5:18 AM   in reply to bonsai123

    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-e xtension-for-air-mobile/

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points