Secondary loaded SWF is freezing on iOS
Good day, guys! I have encountered some strange bug with my app. The architecture is simple: I have a wrapper (preloader) that loads main swf and display it. It's work really fine on my device (iPod 5) in ipa-test-interpreter mode. But when I package it for App Store and send on review it have been rejected (many times already) with reason, that app freezes on startup.
I've thought about this problem and tried to package app in ipa-test. And.. It's really freeze on startup!
I think the problem is in multiple SWF or something like that.
Here are some code:
private function init():void
{
swfLoader = new Loader();
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, mainSwfLoaded);
swfLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, IOLoadingError);
swfLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, SecurityLoadingError);
swfLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
swfLoader.load(new URLRequest('external_swf/main.swf'), loaderContext);
}
private function mainSwfLoaded(e:Event):void
{
swfLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, mainSwfLoaded);
swfLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, IOLoadingError);
swfLoader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, SecurityLoadingError);
swfLoader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
addChild(swfLoader.content);
}
I'm using Adobe AIR SDK 3.7 and FlashDevelop. What it's can be? Some restrictions to load external swf? Both of my SWF's are package in the same ipa.
