Guillermo GutiƩrrez Doral created CB-12919:
----------------------------------------------

             Summary: Cocoapods dependencies in Plugin.xml causes CLI build to 
fail
                 Key: CB-12919
                 URL: https://issues.apache.org/jira/browse/CB-12919
             Project: Apache Cordova
          Issue Type: Bug
          Components: cordova-cli, cordova-ios
    Affects Versions: 7.0.1
         Environment: Cordova CLI 7.0.1
cordova-ios 4.4.0
Xcode 8.3.2
            Reporter: Guillermo GutiƩrrez Doral
            Assignee: Shazron Abdullah


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"/>
                        </feature>
                </config-file>
                <source-file src="src/ios/twinpush.m"/>
                <framework src="TwinPushSDK" type="podspec" spec="2.2.0"/>
        </platform>

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



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to