0
votes

I am writing an app in ActionScript for AIR on iOS. It loads embedded SWFs using a Loader and loadBytes. This works great (I'm using a LoaderContext as described in AIR>=3.5 docs).

However, as soon as I include native extensions that I need for my app, I start getting this familiar error:

Error #3747: Multiple application domains are not supported on this operating system.

Oddly, I was able to compile a few times after removing and re-adding the native extensions and deleting the "extensions" node from the application descriptor XML (though it is automatically re-inserted at build time, this seemed to be important). But I'm getting the error again and can't seem to replicate that workaround.

Anyone have a solution / workaround for this? I must use external SWFs and I must use the ANEs.

Any help is appreciated.

2
ANE should not be concerned with applicationdomain, however loading external swf must be done using a lodercontext set to the same applicationdomain on IOS. - BotMaster
I agree an ANE shouldn't affect application domain. But it seems to. And, as mentioned, I am using a LoaderContext (it wouldn't have worked in the first place without this). - solidgoldrobot
So, I switched to packaged SWFs loaded via the Loader.load method (with LoaderContext for ApplicationDomain), as opposed to embedded SWFs loaded via Loader.loadBytes, and this got it working again... for a moment. Then I added another ANE that I need and it broke again. So, I switched back to loadBytes. No dice. Not sure why it temporarily started working... - solidgoldrobot
Another update / possible clue... switching back to loading SWFs instead of bytes, I now get this error: Error #2112: Provided parameter LoaderContext.ApplicationDomain is from a disallowed domain. - solidgoldrobot

2 Answers

0
votes

Okay, solved.

My Loader was being started after a delay: setTimeout(loader.load, delay);

The delay was masking the real error, which was that there's Actionscript in the SWF being loaded (not allowed on iOS). I had the app set up right (both with loadBytes and load), I just missed some code in this particular SWF.

So, for anyone who's using a setTimeout and a LoaderContext and is still getting these errors, take the setTimeout out of the mix and you might see a different error.

Strange that it changes after a few milliseconds...

0
votes

You can vote to add multiple application domain feature on AIR for iOS: https://tracker.adobe.com/#/view/AIR-4198504