cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillermo Gutiérrez Doral (JIRA) <j...@apache.org>
Subject [jira] [Updated] (CB-12919) Cocoapods dependencies in Plugin.xml causes CLI build to fail
Date Wed, 14 Jun 2017 10:24:00 GMT

     [ https://issues.apache.org/jira/browse/CB-12919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Guillermo Gutiérrez Doral updated CB-12919:
-------------------------------------------
    Description: 
Any plugin that includes a Cocoapods dependency causes the build to fail.

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

{code}
    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 .
{code}

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

{code: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>
{code}

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

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

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:

{code}
    cordova run ios
{code}

Fails with this error:

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

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

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

{code}
    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 .
{code}

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

{code: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>
{code}

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

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

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:

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


> 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:
> {code}
>     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 .
> {code}
> Add any Cocoapods framework dependency to the iOS target in `plugin.xml`:
> {code: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>
> {code}
> Then, create a new project and add the plugin as dependency:
> {code}
>     cordova create MyApp com.mycompany.myapp MyApp
>     cd MyApp
>     cordova platform add ios
>     cordova plugin add ../twinpush-plugin/twinpush --verbose
> {code}
> 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:
> {code}
>     cordova run ios
> {code}
> Fails with this error:
> bq. 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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message