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

Cordova plugins modifying “*-Info.plist” CFBundleURLTypes

    XMLWordPrintableJSON

    Details

      Description

      The issues is found in version 5.1.1, but for some reasons I can not specify this version submitting this issue.
      When cordova plugin is modifying the property CFBundleURLTypes, duplicate entries are added each time cordova build ios is run.
      I.e.:
      https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git
      https://github.com/Wizcorp/phonegap-facebook-plugin
      in launch my app plugin.xml

       <config-file target="*-Info.plist" parent="CFBundleURLTypes">
            <array>
              <dict>
                <key>CFBundleURLSchemes</key>
                <array>
                  <string>$URL_SCHEME</string>
                </array>
              </dict>
            </array>
          </config-file>
      

      in facebook plugin.xml

      <config-file target="*-Info.plist" parent="CFBundleURLTypes">
                <array>
                  <dict>
                    <key>CFBundleURLSchemes</key>
                    <array>
                      <string>fb$APP_ID</string>
                    </array>
                  </dict>
                </array>
              </config-file>
      

      after first build (or platform add) in file *-Info.plist

      <array>
            <dict>
              <key>CFBundleURLSchemes</key>
              <array>
                <string>fbXXXXX</string>
              </array>
            </dict>
            <dict>
              <key>CFBundleURLSchemes</key>
              <array>
                <string>mycoolapp</string>
              </array>
            </dict>
          </array>
      

      after second build (or platform add) in file *-Info.plist

      <array>
            <dict>
              <key>CFBundleURLSchemes</key>
              <array>
                <string>fbXXXXX</string>
              </array>
            </dict>
            <dict>
              <key>CFBundleURLSchemes</key>
              <array>
                <string>mycoolapp</string>
              </array>
            </dict>
            <dict>
              <key>CFBundleURLSchemes</key>
              <array>
                <string>fbXXXXX</string>
              </array>
            </dict>
            <dict>
              <key>CFBundleURLSchemes</key>
              <array>
                <string>mycoolapp</string>
              </array>
            </dict>
          </array>
      

      duplicate values are added each time after build

        Attachments

          Activity

            People

            • Assignee:
              shazron Shazron Abdullah
              Reporter:
              akoc Aivars Akots
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: