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

napcat commented on CB-10063:
-----------------------------

Yes, I can confirm. Config.xml does not currently suporte <config-file>, only 
plugin.xml. I can't exactly remember where that info is in the docs, but you 
can see that is only available in the plugin.xml here: 
https://cordova.apache.org/docs/en/5.4.0/plugin_ref/spec.html

For that reason I created a "plugin" just to write the config files.

You can download my example or use your own.
The plugin source I'm using is:

{code:xml}
<?xml version='1.0' encoding='UTF-8'?>
<plugin id="cordova-plugin-app" version="0.0.1" 
xmlns="http://apache.org/cordova/ns/plugins/1.0";>
  <name>Plugin App</name>
  <author>Helder Santos</author>
  <description>Cordova plugin para override e adição de valores no plist, 
android e windows manifest.</description>
  <keywords>cordova, ios, android, wp8, app</keywords>
  <license>MIT</license>
  <engines>
    <engine name="cordova" version=">=3.0.0"/>
  </engines>

  <!--OVERRIDES IOS-->
  <platform name="ios">
    <config-file target="*-Info.plist" 
parent="UISupportedInterfaceOrientations">
      <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
      </array>
    </config-file>

    <config-file target="*-Info.plist" 
parent="UISupportedInterfaceOrientations~ipad">
      <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
      </array>
    </config-file>

    <config-file target="*-Info.plist" parent="NSAppTransportSecurity">
      <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
      </dict>
    </config-file>

    <config-file target="*-Info.plist" parent="UIStatusBarHidden">
      <true/>
    </config-file>

    <config-file target="*-Info.plist" 
parent="UIViewControllerBasedStatusBarAppearance">
      <false/>
    </config-file>
    
  </platform>

  <!--OVERRIDES ANDROID-->
  <platform name="android">
  </platform>

  <!--OVERRIDES WP8-->
  <platform name="wp8">
  </platform>

  <!--OVERRIDES WINDOWS-->
  <platform name="windows">
  </platform>
</plugin>
{code}




> cordova-cli 5.4.0 bug with PList creation
> -----------------------------------------
>
>                 Key: CB-10063
>                 URL: https://issues.apache.org/jira/browse/CB-10063
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI, CordovaLib
>    Affects Versions: 5.4.0
>            Reporter: Gregor
>              Labels: cordova-ios-4.0.x
>
> Our config.xml has this part in:
> {code:java}
>     <platform name="ios">
>       <!-- ios restrictions -->
>       <preference name="target-device" value="universal" />
>       <config-file target="*-Info.plist" 
> parent="UISupportedInterfaceOrientations">
>         <array>
>           <string>UIInterfaceOrientationPortrait</string>
>           <string>UIInterfaceOrientationPortraitUpsideDown</string>
>         </array>
>       </config-file>
>       <config-file target="*-Info.plist" 
> parent="UISupportedInterfaceOrientations~ipad">
>         <array>
>           <string>UIInterfaceOrientationPortrait</string>
>           <string>UIInterfaceOrientationLandscapeLeft</string>
>           <string>UIInterfaceOrientationPortraitUpsideDown</string>
>           <string>UIInterfaceOrientationLandscapeRight</string>
>         </array>
>       </config-file>
>     </platform>
> {code}
> With Cordova 5.4.0 installed, PList gets generated, but there is no part with 
> orientation options in. Removing 5.4.0 and installing 5.3.3, everything 
> functions as should. 
> Looking at update_platform_config.js hook and echoing this line out 
> {code:java}
> fs.writeFileSync(targetFile, tempInfoPlist, 'utf-8');
> {code}
> You will see in console, the part with orientation is in. Also, if you save 
> this exact same string into some new generic file, it will be successfully 
> saved. However, the original platforms/ios/myapp/myapp.plist file won't 
> include the orientation part.
> This is a serious bug and a huge issue for us. Going to buggy 5.3.3 is a huge 
> step down for us, and not having this orientation in 5.4.0 is another.
> I don't know if there's actually anyone alive here, but I surely hope, 
> someone will someday found this ticket and say "hey.. look.. we aren't the 
> only ones that have the problem with the orientation thing on ios"
> Regards.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to