Copy link to clipboard
Copied
Hello,
we have an application that downloads content (various swf files as well as images and sounds) from the internet and stores them in the cache folder of the application.
When we run the application on PC it runs correctly, when we try to run it on iPad, it fails to find the downloaded files (although we can see that they exist right after we have downloaded them).
Any solutions?
Thank you in advance.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Good evening,
First of all thanks for replaying, however we are aware of those article and we have taken them under consideration when we built our products. The problem still exists even if we use externalSWFs.txt as mentioned in the second article.
I don't remember if I mentioned that earlier, but we can download and unpack our swf files on iPad (File.cacheDirectory), but when we try to access them we get a file not found exception.
Below is some code that might help a bit:
var newPath:String = File.cacheDirectory.url + "/" + "Data/swf/main.swf";
var urlRequest:URLRequest = new URLRequest(newPath);
var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
urlRequest.cacheResponse = false;
urlRequest.useCache = false;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.load(urlRequest, loaderContext);
The same code works fine on PC build. Is there any possibility (I don't think so) that we might have security issues because we are trying to access the cache?
Thank you in advance.
Copy link to clipboard
Copied
We are still getting the same error (URL not Found) even if we use applicationStorageDirectory.
Copy link to clipboard
Copied
Hello again and thanks for replying,
maybe I wasn't clear on my previous posts, but here is the case:
We have some swf and multimedia (sounds/images) files zipped on our server, we download the zipped file on iPad and unzip it on iPad (either on Cache, or on Storage directory). When we unzip this file, we can see that every file in it exists on iPad, however when we try to access them (i.e load a music file, or a swf file) we get the stream error exception.
The same code runs just fine on PC.