我目前正在使用 Cordova Phonegap 为 iOS 构建应用程序。它工作正常,但现在我在终端中运行 cordova build ios
时遇到错误。
我收到以下错误:
** EXPORT FAILED **
Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,RoastBot.xcarchive,-exportOptionsPlist,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/exportOptions.plist,-exportPath,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/build/device
感谢任何帮助!
最佳答案
这是由于 Xcode 9 期望 exportOptions.plist 中的某些值位于错误消息中显示的路径中。在您的情况下,它是 ,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/exportOptions.plist
。
下面是 exportOptions.plist
寻找我的方式:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>compileBitcode</key>
<false/>
<key>method</key>
<string>development</string>
<key>teamID</key>
<string>TEAM_ID_GOES_HERE</string>
<key>provisioningProfiles</key>
<dict>
<key>YOUR_BUNDLE_ID</key>
<string>PROVISIONIG_PROFILE_UUID_WOULD_BE_HERE</string>
</dict>
<key>signingStyle</key>
<string>manual</string>
<key>signingCertificate</key>
<string>iPhone Developer</string>
</dict>
</plist>
仔细检查您的 exportOptions.plist
中是否有 provisioningProfiles
和 signingStyle
值,如果没有,那么您可能有
版本。这已在 4.5.2
之前的 cordova-ioscordova-ios 4.5.2
中修复并发布,请参阅 PR
为了解决此错误,请将您的 cordova-ios
更新到 4.5.2
或更高版本,删除您的插件和平台并重新添加它们。
但是在升级到 cordova-ios 4.5.4
后,我开始看到以下错误:
ld: 270 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
事实证明,这是由于 cordova
将 cordova-plugin-console
构建到其核心中造成的,如果您的项目中有该插件,那么您可能得到上面的错误。只需删除 cordova-plugin-console
,此错误就会消失。这是控制台插件的 github 页面上的内容:
This plugin is no longer being worked on as the functionality provided by this plugin is now included in cordova-ios 4.5.0 or greater, and support is already built in to cordova-windows > 5.0.0. You should remove this plugin from your applications.
这是 link to the docs .
关于ios - 构建 ios 时 Cordova Phonegap "Export Failed"错误代码 70,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41412808/