我收到错误,当命令尝试运行ionic platform add ios
后ionic plugin add ../my-custom-plugin
。错误:窗格:命令失败,退出代码1使用科尔多瓦
Failed to install 'cordova-plugin-my-custom-plugin':Error: pod: Command failed with exit code 1
at ChildProcess.whenDone (/path/to/myprj/platforms/ios/cordova/node_m
odules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Error: pod: Command failed with exit code 1
我的plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/an
droid" id="cordova-plugin-my-custom-plugin" version="0.0.1">
<name>MyCustomPlugin</name>
<js-module name="MyCustomPlugin" src="www/Test.js">
<clobbers target="cordova.plugin.mycustomplugin" />
</js-module>
<platform name="ios">
<framework src="fmdb" type="podspec" spec="~> 2.6.2" />
<config-file parent="/*" target="config.xml">
<feature name="MyCustomPlugin">
<param name="ios-package" value="MyCustomPlugin" />
</feature>
</config-file>
<source-file src="src/ios/MyCustomPlugin.swift" />
</platform>
</plugin>
我已经尝试过的东西:
但仍不能修复它。哪里不对?
我使用:
- MACOS塞拉利昂
- 离子2.2.1
- 科尔多瓦6.5.0
- 的CocoaPods 1.2.1
但是我在运行'ionic run ios -c -s -device -l'时也出现了编译错误。 '苹果机Mach-O连接器(编号)错误'...通常科尔多瓦是痛苦的... – neske
我发现了'Apple Mach-O连接器(编号)错误'的原因。我的项目使用'cordova-plugin-mauron85-background-geolocation'插件(2.2.5)。如果我们安装插件,那么发生问题。 – neske