Skip to main content
This topic has been closed for replies.

3 replies

Participating Frequently
December 6, 2017

I have been having a similar issue; it seems to boil down to the change from UIWebView to WKWebView and our inability to update this configuration on the WKWebView

wkwebview.configuration.preferences.setValue(true, forKey: "allowFileAccessFromFileURLs")

If we could edit this configuration and set it to true as in the snippit then we should be able to load our local content properly within the WKWebView. Until then I am forced to use Air 25 and the previous version of Adobe Animate

WMSH
Participating Frequently
December 11, 2017

I have been having a similar issue too, and I am forced to use Air SDK 25 too !

Adobe Employee
December 4, 2017

Hi,

Please Find the sample code which is working fine for us. Please Try this and let us know if this works fine for you as well. Also attaching the html file used.


var source:File = File.applicationDirectory.resolvePath("elements.html");
trace(source.exists);
var fp:String = new File(source.nativePath).url;

OR

var source:File = File.applicationDirectory.resolvePath("elements.html");
var destination:File = File.applicationStorageDirectory.resolvePath("page.html");
source.copyTo( destination, true );
trace(destination.exists);
var fp:String = new File(destination.nativePath).url;

try
{
  webView.loadURL(fp);

}

koflAuthor
Participating Frequently
December 13, 2017

<link rel="stylesheet" href="css/xxxx.css" type="text/css" />

<script language="javascript" src="js/xxxxx.js"></script>

<img src="./image/xxx.jpg" />

These tags do not work.

air 28.0.0.125

Adobe Employee
November 24, 2017

Hi,

We have tried same at our end using 28.0.0.112 on iOS9, iOS10 and iOS11. Its working fine, please share more information with us.

Regards,

Adobe AIR Team

Known Participant
November 29, 2017

Hi surbhis32650692,

I still experience the same issue. I am using Animate CC to build Air for iOS app. HTML files downloaded to the iOS app's documentsDirectory on the iPad does not load from the stagewebview.

When you wrote that you have tried at your end using 28.0.0.112, where are the local HTML files located that you are able to load through stagewebview?

Do you have a source file or actionscript line by line that you can share?

Regards.