Software Archive
Read-only legacy content
17061 Discussions

IOS orientation locked after updating to 2548

Theo_v_
Beginner
613 Views

Hi there,

My IOS build app is locked in portrait mode while orientation is set to default in IOS build options.
Used to work fine in previous version of XDK. Tested with Ipad2 IOS 8.4.1

Any suggestions?

 

 

 

 

0 Kudos
1 Solution
Swati_S_Intel1
Employee
613 Views

@Theo, The orientation should work with Cordova CLI 5.1.1, you would have to add this into intelxdk.config.additions.xml file:

<platform name="ios">
        <preference name="Orientation" value="all" />
    </platform>

Let me know if this does not work for you.

 

View solution in original post

0 Kudos
9 Replies
Theo_v_
Beginner
613 Views

I fixed this behaviour somewhat with Screen orientation plugin:
screen.unlockOrientation();

But app still starts with a portait splash screen when it's in landscape modus.

Same problem with statusbar; I can hide  statusbar with statusbar plugin, 
but statusbar shows during splash screen.

This used to work fine before XDK update, 
any suggestions?

0 Kudos
Theo_v_
Beginner
613 Views

Just did a test with a empty XDK template and same problem occurs:
Application is  locked by default in portrait mode while orientation is set to default in XDK. 
Tested on ipad2  IOS 8.4.1
(Problem only occurs when application is fully build as IPA file and installed on ipad)

Anybody else having same problem? Any suggestions?

0 Kudos
PaulF_IntelCorp
Employee
613 Views

What happens if you try building with CLI 4.1.2?

0 Kudos
Theo_v_
Beginner
613 Views

Hi Paul,

Thanks for your reply. 
I tried your suggestion and indeed downgrading to CLI 4.1.2 does the trick.
Is this a XDK / Cordova bug?

 

0 Kudos
Theo_v_
Beginner
613 Views

Just a warning: downgrading to CLI 4.1.2 will mess up your plugins.
When I choose to downgrade plugins as well, plugins could not be found/downloaded and were deleted.
 

 

0 Kudos
PaulF_IntelCorp
Employee
613 Views

The messing up of the plugins may be the result of a bug that was fixed in the most recent hotfix. Please update to that hotfix.

Regarding the orientation issue with iOS, this seems to be an ongoing issue with Cordova and iOS. I don't honestly know what the state of this issue is, it seems to vary with platform. For most people, using the cordova-plugin-screen-orientation plugin gets them what they need. You can add it as a "cordova registry" plugin. Find the docs here: https://github.com/gbenvenuti/cordova-plugin-screen-orientation

0 Kudos
Theo_v_
Beginner
613 Views

Thanks for your reply again :) 

I already got the hotfix running when I downgraded.
I got some build errors and had to add Plugin Facebook Connect, Device and Screen Orientation again after the downgrade.

The Screen orientation plugin does do the job, but only when deviceReady event is fired, so that is a bit late. 
The initial splash screen is not showing right.

I continue to work with CLI 4.1.2 for now since I think it's really important that splash screen is showing in right orientation at startup. 
It's a pity I have to work with old plugin versions and old Cordova for this reason,
can you post an update if you have any news on the issue?

 

 

 

0 Kudos
Swati_S_Intel1
Employee
614 Views

@Theo, The orientation should work with Cordova CLI 5.1.1, you would have to add this into intelxdk.config.additions.xml file:

<platform name="ios">
        <preference name="Orientation" value="all" />
    </platform>

Let me know if this does not work for you.

 

0 Kudos
Theo_v_
Beginner
613 Views

Hi Swati,

Thanks for your comment, your solution seems to work now. 
I switched back to Cordova CLI 5.1.

 

0 Kudos
Reply