[ 
https://issues.apache.org/jira/browse/CB-8953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14562592#comment-14562592
 ] 

Dave Alden commented on CB-8953:
--------------------------------

This bug means that it's not possible to create an app which supports all 
orientations on iPhone.

Previously I had the following config in my .plist:

<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>

After running 'cordova prepare', the UISupportedInterfaceOrientations section 
is removed, meaning the app is fixed to portrait orientation.

Adding the orientation preference to the config.xml allows enables portrait OR 
landscape keys to be added to the plist under UISupportedInterfaceOrientations, 
but not both:

<preference name="orientation" value="landscape" />
inserts:
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>

<preference name="orientation" value="portrait" />
inserts:
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>

<preference name="orientation" value="default" /> OR omitting the preference 
key entirely, causes UISupportedInterfaceOrientations to be removed from the 
plist

> Cordova iOS prepare is removing UISupportedInterfaceOrientations from the 
> plist file
> ------------------------------------------------------------------------------------
>
>                 Key: CB-8953
>                 URL: https://issues.apache.org/jira/browse/CB-8953
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 5.0.0
>         Environment: iOS
>            Reporter: Vinoth Kumar
>
> I just installed the CLI 5.0.0 and when I try to run,
> 'cordova prepare ios', it is modifying the app plist file.
> That is, the prepare is removing the UISupportedInterfaceOrientations key and 
> the array list from the plist.
> Before Prepare: 
> <key>UISupportedInterfaceOrientations</key>
>       <array>
>               <string>UIInterfaceOrientationPortrait</string>
>               <string>UIInterfaceOrientationPortraitUpsideDown</string>
>       </array>
>       <key>UISupportedInterfaceOrientations~ipad</key>
>       <array>
>               <string>UIInterfaceOrientationPortrait</string>
>               <string>UIInterfaceOrientationLandscapeLeft</string>
>               <string>UIInterfaceOrientationPortraitUpsideDown</string>
>               <string>UIInterfaceOrientationLandscapeRight</string>
>       </array>
> After Prepare:
>  <key>UISupportedInterfaceOrientations~ipad</key>
>     <array>
>       <string>UIInterfaceOrientationPortrait</string>
>       <string>UIInterfaceOrientationLandscapeLeft</string>
>       <string>UIInterfaceOrientationPortraitUpsideDown</string>
>       <string>UIInterfaceOrientationLandscapeRight</string>
>     </array>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to