Stage orientation event and native extensions
Hello!
I'm developing AIR + Flex 4 app targeted to iOs platform (actually target device is iPad 2). I use self developed native extension (with help of this extension I'm capable of choosing videos from CameraRoll and saving recorded videos to CameraRoll. I need this extension as far as standard CameraRoll and CameraUI classes aren't capable of such things (correct me if I'm wrong). It works just fine except for one thing: StageOrientationEvent is not fired when native extension is in my app's build path.
Further more, it's not fired even if my extenson class isn't instantiated. Simply if I add my native extension in app's build path (in flex builder 4.6 project properties -> Flex Build Path-> Native extensions), and then mark Flex Build Packaging -> iOs -> Native Extensions -> package check box (in front of my extension) then StageOrientationEvent will not be fired.
This is how I initialize my extension view:
-(void) initExtensionView
{
airWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:0];
extWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
vc = [[ExtensionViewController alloc] init];
[extWindow addSubview:vc.view];
}
ExtensionViewController simply creates UIImagePickerController instance and handles all the necessary stuff.
As far as StageOrientationEvent is not fired when the main extension class is instantiated I guess native code of my extension doesn't matter and the way I package the whole thing is the only thing that matters.
When I remove this extension from my app's build path then StageOrientationEvent is fired as expected.
I use Flex SDK 4.6.0 to compile my app. My iPad's iOs version is 5.1.0. I use AIR 3.1 SDK.
Thanks in advance.
Regards, Andrew.
