Copy link to clipboard
Copied
Hi,
There is a problem with the stageWebView in AIR 29 and AIR 30 loading LOCAL HTML files. The scenario is, on the iPad app, I have a html file downloaded and saved locally in a subfolder in the documentsDirectory. The path is something like "file:///var/mobile/Containers/Data/Application/uid/Documents/45/index.html". When the app first launched, it loades the this HTML file and displayed fine. Every link on the HTML within the same sub-directory "45" loads fine.
Then the app downloaded another set of files from the server and saved to another sub-directory in documents directory that has another index.html file - ""file:///var/mobile/Containers/Data/Application/uid/Documents/49/index.html". When the same stageWebView tried to load the index.html from the new sub-directory, it threw the error - [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="The operation couldn't be completed. Operation not permitted." errorID=3228]. This is the same error code before AIR 29 resolved the stageWebView not load local HTML file issue. This seems to be related to the new iOS WKWebVIew.
Same AIR souce file published in AIR 21 can display files from different leveles of sub-directories without a problem.
We thought AIR 29 fixed the stageWebView issue and were not aware of this further issue until a client project, which causes a tremendous problem. Please help, advise, and fix this issue ASAP.
Version AIR 29 and AIR 30
Development platform: Adobe Animate CC 2018, AIR for iOS 29, AIR for iOS 30
Devices: iPad Air 2, iPad Pro 10.5'', iPad Pro 12.9"
iOS 11.3 and iOS 11.4
Thanks.
Copy link to clipboard
Copied
Hi,
As per the current implementation, you can load only those local files in the Stagewebview which are present in the parent directory of the html being loaded.
Eg. If index.html is being loaded in StageWebView and its location is abc/index.html, then you'll be able to load files only inside abc folder. You won't be able to load the local files outside abc folder.
Thanks!
Pravishti | Adobe AIR Engineering
Copy link to clipboard
Copied
Hi Pravishtis,
Thank you for the response.
Can this addtional feature be added to the next AIR lease? This is a given feature in previous AIR versions up to AIR 25 before it switched to WKWebView.
Copy link to clipboard
Copied
Hi,
You can log a bug at Tracker​ and get votes on it so that the feature will be picked up in later AIR releases.
Thanks!
Pravishti | Adobe AIR Engineering
Copy link to clipboard
Copied
Hi Pravishti,
Thanks. I just reported a bug for this issue. This bug should be fixed since launching files from relative paths should be a standard function for any operating system and it has worked without any problem up to AIR 25 before the WKWebView was implemented.