Skip to main content
Inspiring
January 31, 2015
Question

AIR SDK 16 + iOS 64-bit Orientation problem

  • January 31, 2015
  • 11 replies
  • 6819 views

Hey Devs and support,

we have recently faced a problem which seems to be a bug, let me explain what happens as simple as I can. below I explain one situation that the problem occurs but it does happen in different scenarios that we tested, but do the following and you'll see the problem for yourself...

if you are building an adobe air app which is in landscape mode and auto rotate is false which means that the air app should always stay in landscape mode. now, in the app, you have an air native extension which works with Camera and inside the iOS extension, you are setting the app delegate to always portrait with no auto rotation. ok?

the expected behavior (which works perfectly fine with lower air SDK versions and the problem is with iOS 64-bit and AIR 16 only) is that when you start your camera extension, the camera view should be in portrait mode. this is ok till here, but as soon as you close the extension to return to your flash app, you can see that the stage alignment is totally messed up! although you have set the flash app to stay landscape with no rotations, when you get back from the extension, it does force the flash side to portrait too!

it feels like the app delegate settings in the extension are somehow over ruling the settings of the air side. everything used to work fine for years but now that we are compiling against 64-bit, we are facing this problem which seems to be a problem either on iOS side, or maybe from Air SDK 16 side...

please do let me know if I was able to explain the problem understandable? if not, maybe I can create a sample project reflecting the problem and post the download link here so you guys can help better...?

chris.campbell Please advice,

Regards,

Hadi

This topic has been closed for replies.

11 replies

Participant
August 28, 2015

Hi ,

i am still facing orientation issue.

using SDK build(18.0.0.199)

My app.xml settings are :  <aspectRatio>portrait</aspectRatio>    <autoOrients>false</autoOrients>

i.e my first page of app is in portrait mode : i.e login screen ,after login all screen are in landscape mode.

but when i change landscape from portrait , using stage.setAspectRatio(StageAspectRatio.LANDSCAPE);

stage get rotated to Landscape but the Keyboard is still in portrait mode.

Please help.

Regards,

Adarsh

tdwivedi
Adobe Employee
Adobe Employee
August 31, 2015

Hi AdarshSrivastav,

The issue you reported about keyboard orientation, seems to be a different issue than the one reported here. While, I would surely try reproducing it, meanwhile, can you please log a separate bug for this issue at the Bugbase ? ( Never mind, I have found a similar bugbase entry, which seems to be reported by you. Bug#3943007‌‌ ). We will be following up this issue on that thread.

-Tushar,

Adobe AIR Team

Participant
August 31, 2015

Thanks for the reply tdwivedi , Yes (Bug#3943007‌ ) this bug has been posted by me.

Stuck with this issue, do you have any workaround for that.

Thanks,

Adarsh

Participant
July 1, 2015

Just wanted to let you know that I finally got around to testing my game with the latest AIR build (18.0.0.143), and for me this issue is fixed now: I can open the Game Center in landscape mode, and my app (which is fixed to portrait) stays the way it is supposed to.

Indyaner
Participant
June 6, 2015

Any updates on this topic?

I currently run  Air17.0 + FLex 4.6.0 and have major problems with StageOrientationEvent not firing properly. Here is my StackOverflow for the Problem with more Informations. I ask here as I'm also running the Milkman Games CoreMobile ANE. It was today updated to CoreMobile v2.11.0  but my problems still persists and I'm all out of ideas why my StageOrientationEvent dont fire like expected.

Basicly, I want my device to fire StageOrientationEvent but dont want the device to rotate the Screen. I used <autoOrients>true</autoOrients> for that reason and I used e.preventDefault(); (what is now deprecated on iOS).

How can I make the device give me infirmations on all changes to the Stage Orientation, but never actually rotate the screen?

Thank you

Indy

M_E_Sepehr
Participating Frequently
April 16, 2015

Hello every one.

Here is the simplest project to reproduce this problem and also it's reported bug on Adobe's bugbase.

You can also vote for it.

Bug#3964838 - iOS camera resizes the app stage

tdwivedi
Adobe Employee
Adobe Employee
April 16, 2015

Hi M.E.Sepehr,

We tested above project given by you with AIRSDK 17.0.0.96 as mentioned in the bug on iPAd 3 ( iOS 8.1.3 ), but couldn't reproduce the issue after following the steps given in the bug.

4- Publish and install application on iOS 8 ( it could have same problem on other iOS versions ).

5- Open the application on your iPad.

6- Rotate your device to landscape situation.

7- Touch the stage to launch CameraUI.

8- Now return to your application and you will see the stage ratio is changed.


I'm attaching a video of investigation as well :

Dropbox - VID_20150416_144939370.mp4

Kindly inform me if there is some difference in what is done by us, and what you were doing to reproduce this bug.

-Tushar

M_E_Sepehr
Participating Frequently
April 18, 2015

Thanks for your responds Tushar,

Adobe solved CameraUI's bug with some interval tricks at Air 17.0.0.138. But it seems it didn't solve mention problems.

So continue to your struggling!

emstrisAuthor
Inspiring
April 7, 2015

Alright, because we still have the rotation problem, even with SDK 17-124 and even 17-138 then I had to upload a sample project with the ANE we have so you guys can test and see the problem in action.

please download this sample project from Github and run it...

myflashlab/AR-ANE-SampleMarkerless3DAnimation · GitHub

in this project, as you can see in the document class file, we have used a method:

     _ex.fixAirSDKOrientsBug(stage.autoOrients);

this is actually a workaround around the bug. if you are testing the project, please make sure to comment this line out so you will be able to duplicate the rotation problem...

if you are building the .ipa of this project with Air SDK 15 (with no iOS 64-bit support) everything will work fine. but as soon as you compile with SD 16 or 17, the rotation gets messed up!

NOTICE: to be able to compile the project, please make sure to read AR-ANE-SampleMarkerless3DAnimation/ReadMe.pdf at master · myflashlab/AR-ANE-SampleMarkerless3DAnimation · GitHub

Reallu looking forward to have this 64-bit rotation bug fixed completely.

Thanks,

Hadi

emstrisAuthor
Inspiring
April 13, 2015

Any updates about this?!

Inspiring
April 13, 2015

Hadi,

I was able to get my problem resolved with the current Air 17 beta and an accompanying 2.6 update to Milkman iOS/iAd ANE, plus the following lines in Frame 1:

stage.scaleMode = StageScaleMode.EXACT_FIT;

stage.align = StageAlign.TOP_LEFT;

stage.setAspectRatio(StageAspectRatio.LANDSCAPE);

My problem was with orientation and the switch from a landscape formatted game to a portrait formatted iAd when a banner in the game was tapped (I am using the Milkman ANE to handle all of the iAd calls). Coming back (with the home button) to the game left the screen all "goofed up", unplayable and forcing a shutdown to escape. From emails to Milkman, it appears lots of people apparently had the same problem and Adobe jumped on it quickly.

But the AR ANE you are using is much more complex than my simple problem so my simple fix may not be appropriate for you and this tool of yours. Orientation in your context may be MUCH more complex to establish given the dynamic way their AR animation is performed (the youtube video is amazing, I bookmarked that github page to learn more).

Bruce

emstrisAuthor
Inspiring
March 31, 2015

I'd like to update you guys that the problem is still NOT fixed even on Air SDK 17-124 as a workaround, we are doing the following hack but that would be great if this can be fixed...

if the Air app is fixed on either landscape or portrait do this:

1) before opening the native extension window, save the current flash orientation. _defaultOrientation = stage.orientation;

2) after you close the extension and return to flash, make sure the orientation is equal to what you had saved initially. stage.setOrientation(_defaultOrientation);

if the Air app is on autoRotate = true:

1) before opening the extension, call stage.autoRotate = false and then _defaultOrientation = stage.orientation;

2) after you close the extension and return to flash call stage.setOrientation(_defaultOrientation); and then stage.autoRotate = true


Not a pretty solution, but it is at least solving the problem!

Inspiring
March 31, 2015

I do not know where to put this rotation code you describe. I am also using the Milkman iOS ANE and I do not when to save and restore the rotation orientation setting. Can anyone tell us if this will be fixed by Adobe? The game is useless when the app cannot be displayed upon return from an adv in iAd.

Participant
March 31, 2015

You should update your SDK.

This bug has been fixed (Non-compliant handling of orientation in iOS 8 root view controller. (Bug 3942292) ) in the latest AIR SDK 17.0.0.138 (March 24, 2015).

I'm using the Milkman iAd ANE and I encountered the same orientation problem.

With the 17.0.0.138 runtime version, it works perfectly.


Participant
March 12, 2015

Hi,

Same problem here using iAd iOS Extension (Milkman Games ANE).Following scenario: (1) User clicking on landscape mode banner iAD, (2) fullscreen iAD opens, (3) when iAD closed the size of my app is reduced + aligned to bottom right corner.

AIRSKD 16.x

AIRSDK 17.0.0.123

IOS 8.1

IOS 8.2

(Iphone 6+; Iphone 5s; Iphone 4s)

Best

steakache
Participant
March 10, 2015

I have a similar problem with an app that uses Starling.

After spending a lot of time to investigate, it's seems that the "landscape" orientation make a beug on my app when I return to it after calling the camera or "browser" (with a native extension or with AS3, this is the same problem).

I only reproduce this beug in landscape orientation, with ios8 and Air Sdk 17. No problem with portrait orientation or Air Sdk = 15 or with a different version of ios.

I had the same problem with my old version of Air Sdk 16, I'll try with the recent one.

Participant
March 11, 2015

Hi,

I faced the same problem using iAd iOS Extension (Adobe and Milkman Games ANEs).

When a user clicks on one of the banner ads, a fullscreen pop-up ad is shown, and after closing this screen, the size of my app (a Starling app) is reduced by one third, I get a blinking rectangle on the top of the screen and a white rectangle on the vacuum remaining third to right.


AIRSDK 16.x.x

AIRSDK 17.0.0.123

iOS 8.1


Best regards,

Participant
February 13, 2015

I've got a similar problem with the Game Center ANE for iOS (64bit) by Adobe (also with the Admob ANE by Milkman).

My app is set to portrait-mode only. But if I'm holding my phone sideways (landscape) and call the native leaderboard overlay of Game Center, the overlay will be displayed in landscape-mode. After closing it my app is messed up and half the screen is flickering.

If I turn my phone upside down (portrait-mode, top home button) afterwards, everything is fine again. So it seems that the stageOrientation needs to be refreshed ...

Starling

iOS 8

iPhone 5

Adobe Air 16 (latest Version) and 17 beta

Participant
March 3, 2015

Same here: After opening the game center leaderboard view in landscape and closing it again, the viewport gets screwed up. App is still in portrait, as it is designed to be, but the viewport is shifted down about half the screen (496 pixels, to be precise: behind the game center overlay, the stage gets rotated into landscape, so only the top 640 px (screen width) are visible; when going back from the landscape view, the stage is rotated again, but not repositioned correct, it seems). No flickering though, as reported by oignon lapin, but the touch coordinates are wrong as well (they don't match either the original nor the shifted viewport).

I get a resize event in starling when the game center overlay opens in landscape mode, but no resize event when returning to the app in portrait. I can force a resize into the correct portrait orientation by opening the overlay with the phone upside-down, as oignon lapin observed already.

I've set autoOrient= false and aspectRatio=portrait in the app descriptor. stage.scaleMode is set to NO_SCALE, and stage.align = TOP_LEFT.

Using Air 16 Build 292, Starling (latest from GitHub). iOS 8.1.3, iPhone 5S

Any ideas?

chris.campbell
Community Manager
Community Manager
March 4, 2015

Jan (and others),

Can you please try the Feb 25th beta?  We had some additional fixes integrated into this beta.  This is a tricky area with iOS8 but we believe we've resolved most of the issues.

2/25/2015 - Beta - AIR 17.0.0.123

Thanks,

Chris

Adobe Employee
February 9, 2015

Thanks for reporting the issue.

Could you please confirm few things:

- Are you able to see this issue on both iOS 8 and iOS 7 devices ?

- Which ANE you are using ?

Its will be good if you could share a sample code so that we could reproduce the problem at our end.

Regards,

Jitender

opamama
Participant
February 10, 2015

Hi Jitender,

it seems to happen just in IOS8. IOS7 works.

I do not use any ANE.

These are the Settings for initialWindow:

<aspectRatio>landscape</aspectRatio>
<fullScreen>false</fullScreen>
<autoOrients>true</autoOrients>
<visible>true</visible>
<renderMode>direct</renderMode>
<depthAndStencil>true</depthAndStencil>

I also tried rendermode=gpu and fullscreen=true, autoOrients=false.

There is no Code to show - I just have an empty Main-Class extending Sprite...

Thanks you!

Philip