1
votes

I want to implement Workers into a mobile app created with Adobe AIR 20.0. According to Adobe, this iOS concurrency is supported starting with AIR 19. Thing is, even if I simply check if the WorkerDomain is supported by requesting the value of WorkerDomain.isSupported in my main app, it returns false.

If I skip the test of this and load the Worker SWF with URLRequest + Loader (which should work with iOS & AIR 20.0), the Loader's Event.COMPLETE event is fired, but the worker can't be created using the bytes provided by the Loader (WorkerDomain.current.createWorker(workerBytes) returns null). I don't know if this is because something in my project configuration causes the WorkerDomain.isSupported call to return false, or the fact that the file size of the packaged worker's SWF is different to its size in my project's directory.

Needless to say that everything works perfectly when testing on a Desktop environment (where the file size of my worker SWF doesn't change..).

Thanks for your help.

1

1 Answers

1
votes

I had a similar problem. I was trying to create a worker using WorkerFactory.getWorkerFromClass (https://github.com/silviopaganini/AS3-Workers-Manager/blob/master/src/cacilds/workers/WorkerFactory.as) and on iOS it was returning null with no errors. I solved it by adding the compiler options -swf-version=31 -optimize=false