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

Cocoapods dependencies in Plugin.xml causes CLI build to fail



    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7.0.1
    • Fix Version/s: cordova-ios@4.5.1
    • Component/s: cordova-cli, cordova-ios
    • Labels:
    • Environment:

      Cordova CLI 7.0.1
      cordova-ios 4.4.0
      Xcode 8.3.2


      Any plugin that includes a Cocoapods dependency causes the build to fail.

      To reproduce it, you can create an empty plugin skeleton:

          plugman create --name twinpush --plugin_id twinpush-plugin --plugin_version 1.0 --path twinpush-plugin
          cd twinpush-plugin/twinpush
          plugman platform add --platform_name ios
          plugman createpackagejson .

      Add any Cocoapods framework dependency to the iOS target in `plugin.xml`:

      	<platform name="ios">
      		<config-file parent="/*" target="config.xml">
      			<feature name="twinpush">
      				<param name="ios-package" value="twinpush"/>
      		<source-file src="src/ios/twinpush.m"/>
      		<framework src="TwinPushSDK" type="podspec" spec="2.2.0"/>

      Then, create a new project and add the plugin as dependency:

          cordova create MyApp com.mycompany.myapp MyApp
          cd MyApp
          cordova platform add ios
          cordova plugin add ../twinpush-plugin/twinpush --verbose

      The plugin install is successfull and the log shows how the `TwinPushSDK` pod is being installed, however, trying to run (or build) the project from the command line:

          cordova run ios

      Fails with this error:

      Error: Expected "/*", "//", or "{" but "<" found.

      At this point, most of the actions fail with the same error. Even trying to uninstall the plugin fails. However, opening the xcworkspace in XCode seems to work as expected, so it seems a CLI issue.

      To test with an already created plugin, you can use this one for example:

      cordova plugin add https://github.com/heigeo/cordova-plugin-tensorflow




            • Assignee:
              shazron Shazron Abdullah
              redent Guillermo GutiƩrrez Doral
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: