Highlighted

ATS and its effects on loadURL and local HTML Files

New Here ,
Jun 27, 2016

Copy link to clipboard

Copied

I have an application that is affected by the new ATS protocol and the NSExceptionDomains key you can add to InfoAdditions has worked a treat along with changing to https where I can, but this has got me worried, I make use of the StageWebView to load local HTML files that have been generated from my application.

I use:

var lwf:File = File.cacheDirectory.resolvePath("generatedPageFolder/htmlFileHere.html")

swv.loadURL (lwf.nativePath)

This allows me to find the file that has been created and determine its full path and load it into the waiting stageWebView.

My question is how do I add the cacheDirectory to the list of exception domains so the file will still load, I have tried adding file:// to no success and I am struggling to think of another way to do this.

Many thanks.

TOPICS
Development

Views

125

Likes

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

ATS and its effects on loadURL and local HTML Files

New Here ,
Jun 27, 2016

Copy link to clipboard

Copied

I have an application that is affected by the new ATS protocol and the NSExceptionDomains key you can add to InfoAdditions has worked a treat along with changing to https where I can, but this has got me worried, I make use of the StageWebView to load local HTML files that have been generated from my application.

I use:

var lwf:File = File.cacheDirectory.resolvePath("generatedPageFolder/htmlFileHere.html")

swv.loadURL (lwf.nativePath)

This allows me to find the file that has been created and determine its full path and load it into the waiting stageWebView.

My question is how do I add the cacheDirectory to the list of exception domains so the file will still load, I have tried adding file:// to no success and I am struggling to think of another way to do this.

Many thanks.

TOPICS
Development

Views

126

Likes

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
Jun 27, 2016 0

Have something to add?

Join the conversation