Skip to main content
Participant
January 30, 2012
Question

Stage orientation event and native extensions

  • January 30, 2012
  • 3 replies
  • 1368 views

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.

This topic has been closed for replies.

3 replies

Participant
April 12, 2012

Not directly. Have you had success fixing this type of issue by building through command line/terminal?

Participant
April 11, 2012

I'm also having this problem, but with the NetworkInfo native extension created by Adobe for iOS. Did you make any progress on figuring this out?

Thanks,

Patrick

April 12, 2012

Have you tried packaging using ADT?