Skip to main content
Inspiring
March 1, 2020
Question

loading html file from ipad's application storage directory in AirforIOS

  • March 1, 2020
  • 1 reply
  • 401 views

Dear Friends,


iam creating an app with AirforIOS, it has online and offline mode. iam trying to load html file in stagewebview, it loading in online mode. but in offline mode its not. iam loading my html file from application storage directory.
var webView: StageWebView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle(0, 20, stage.stageWidth, stage.stageHeight+10);

var loadLocation:String = "";
if(onlineMode){
loadLocation = downloadSite;
}else{
loadLocation = new File(File.applicationStorageDirectory.resolvePath(currentModuleLocation+"/Lessons/"+currentLessonLocation+"/index.html").nativePath).url;
}

webView.loadURL(loadLocation+"?aa=" + webLesVal + "&bb=" + tokenType + " " + accessToken + "&cc=" + deviceID);

stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey);
trace(StageWebView.isSupported);

Thanks in advance,

Syed Abdul Rahim

This topic has been closed for replies.

1 reply

rahimhajiAuthor
Inspiring
March 2, 2020

iam using Air SDK 32.0.0.116 Air for IOS. Please help me to find a solution my friend... i got struck up...