我遇到了同样的问题。
版本信息:node -v:v7.10.0 npm -v:4.6.1 cordova -v:7.0.1 angular / cli:1.0.4 ionic -v:3.3.0
错误消息:
cordova编译ios ✖运行命令 - 失败!
[错误] Cordova遇到错误。 您可以通过直接运行上面的Cordova命令获得更多洞察力。
[ERROR]运行cordova compile ios时出错(退出代码1):
Error: EACCES: permission denied, open '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/cordova/build-extras.xcconfig'
gegaozhaodeiMac:SengledLife-0 gegaozhao $ sudo ionic cordova编译ios
cordova编译ios ✖运行命令 - 失败!
[错误] Cordova遇到错误。 您可以通过直接运行上面的Cordova命令获得更多洞察力。
[ERROR]运行cordova compile ios时出错(退出代码1):
(truncated) ... :/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/ImageMagick/bin:/Applications/Wireshark.app/Contents/MacOS"
/usr/sbin/chown -RH root:wheel /var/root/Library/Developer/Xcode/DerivedData/SengledLife-ewbxwhbmxfyrqvehvjnxjlgxqyej/Build/Intermediates/ArchiveIntermediates/SengledLife/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libCordova.a
SetMode u+w,go-w,a+rX /var/root/Library/Developer/Xcode/DerivedData/SengledLife-ewbxwhbmxfyrqvehvjnxjlgxqyej/Build/Intermediates/ArchiveIntermediates/SengledLife/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libCordova.a
cd /Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/CordovaLib
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/ImageMagick/bin:/Applications/Wireshark.app/Contents/MacOS"
/bin/chmod -RH u+w,go-w,a+rX /var/root/Library/Developer/Xcode/DerivedData/SengledLife-ewbxwhbmxfyrqvehvjnxjlgxqyej/Build/Intermediates/ArchiveIntermediates/SengledLife/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libCordova.a
=== BUILD TARGET SengledLife OF PROJECT SengledLife WITH CONFIGURATION Debug ===
Check dependencies
Signing for "SengledLife" requires a development team. Select a development team in the project editor.
warning: no rule to process file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/System/Library/Frameworks/SLLivePlaySdk.framework' of type wrapper.framework for architecture armv7
warning: no rule to process file '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/SengledLife/Plugins/com.sengled.slliveplayer/SLLivePlayBundle.bundle' of type wrapper.plug-in for architecture armv7
warning: no rule to process file '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/SengledLife/Plugins/com.sengled.snapNetwork/cloud' of type file for architecture armv7
warning: no rule to process file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/System/Library/Frameworks/ElementScanBulbCodeVIewSdk.framework' of type wrapper.framework for architecture armv7
warning: no rule to process file '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/SengledLife/Plugins/com.sengled.zxing.barcodescanner/notice.gif' of type image.gif for architecture armv7
warning: no rule to process file '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/SengledLife/Plugins/com.sengled.zxing.barcodescanner/ScanBulbCodeViewController.h' of type sourcecode.c.h for architecture armv7
warning: no rule to process file '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/SengledLife/Plugins/com.sengled.zxing.barcodescanner/SlScanNavigationController.h' of type sourcecode.c.h for architecture armv7
warning: no rule to process file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/System/Library/Frameworks/SLLivePlaySdk.framework' of type wrapper.framework for architecture arm64
warning: no rule to process file '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/SengledLife/Plugins/com.sengled.slliveplayer/SLLivePlayBundle.bundle' of type wrapper.plug-in for architecture arm64
warning: no rule to process file '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/SengledLife/Plugins/com.sengled.snapNetwork/cloud' of type file for architecture arm64
warning: no rule to process file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/System/Library/Frameworks/ElementScanBulbCodeVIewSdk.framework' of type wrapper.framework for architecture arm64
warning: no rule to process file '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/SengledLife/Plugins/com.sengled.zxing.barcodescanner/notice.gif' of type image.gif for architecture arm64
warning: no rule to process file '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/SengledLife/Plugins/com.sengled.zxing.barcodescanner/ScanBulbCodeViewController.h' of type sourcecode.c.h for architecture arm64
warning: no rule to process file '/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/SengledLife/Plugins/com.sengled.zxing.barcodescanner/SlScanNavigationController.h' of type sourcecode.c.h for architecture arm64
Code signing is required for product type 'Application' in SDK 'iOS 10.2'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/cordova/build-debug.xcconfig,-workspace,SengledLife.xcworkspace,-scheme,SengledLife,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,SengledLife.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/gegaozhao/Desktop/SengledLife-0/platforms/ios/build/sharedpch
---以上是我的详细信息,如果有好的解决方案,请分享,谢谢