Boilerplate ANE code to load a file in iOS?
I'm running into a bottleneck with this app I'm working on and I'm hoping the bottleneck is happening with some raw number crunching on the file loader... since I do that number crunching in a Worker on desktop and it works fine there (though it might be for other reasons too...)
So I'm thinking of writing a native extension which will load a file and pass some data back when it's ready, in chunks, via a thread that won't interfere with the main swf
A couple questions
1) is that possible
2) I'm lost with Objective-C... I'm happy to learn the syntax and whatnot, but figuring out the whole ecosystem there is a bit daunting just to do this. Any idea where to look for some boilerplate code that does the following, all in a separate thread:
A) Wait for 4 different types of commands from main swf: Set file path, Set Position, Read next N bytes, Close file
B) When Read next N bytes is called, it sends it back via an event or something that won't tie up main swf.
Thanks!
Similarly, are native extensions always in a separate thread, so there's no need to make it spawn another thread from itself?
