Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10063

cordova-cli 5.4.0 bug with PList creation

    XMLWordPrintableJSON

    Details

    • Flags:
      Important

      Description

      Our config.xml has this part in:

          <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>
      

      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

      fs.writeFileSync(targetFile, tempInfoPlist, 'utf-8');
      

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dpogue Darryl Pogue
                Reporter:
                lordgreg Gregor
              • Votes:
                3 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: