(Cordova)Xcode 5.1错误Apple Mach-O链接器错误libCordova.a文件未find

我最近尝试存档我的产品,以便将其提交到应用程序商店,但遇到了这个已经吃光了我的时间的错误。 错误如下:

Ld / Users / guled / Library / Developer / Xcode / DerivedData / Alter-arpezfgnfzcguefnjpllgwzddkld / Build / Intermediates / ArchiveIntermediates / Alter-App Store / IntermediateBuildFilesPath / Alter.build / App \ Store-iphoneos / Alter.build / Objects-normal / armv7 /更改正常armv7 cd /应用程序/ MAMP / htdocs /更改/平台/ ios出口IPHONEOS_DEPLOYMENT_TARGET = 6.0导出PATH =“/应用程序/ Xcode.app /内容/开发人员/平台/ iPhoneOS.platform /开发/ usr /斌:/ Applications / Xcode.app / Contents / Developer / usr / bin:/ usr / bin:/ bin:/ usr / sbin:/ sbin“/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin / clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L / Users / guled / Library / Developer / Xcode / DerivedData / Alter- arpezfgnfzcguefnjpllgwzddkld / Build / Intermediates / ArchiveIntermediates / Alter-App \ Store / BuildProductsPath / App \ Store-iphoneos -F / Users / guled / Library / Developer / Xcode / DerivedData / Alter-arpezfgnfzcguefnj pllgwzddkld / Build / Intermediates / ArchiveIntermediates / Alter-App Store / BuildProductsPath / App \ Store-iphoneos -filelist / Users / guled / Library / Developer / Xcode / DerivedData / Alter-arpezfgnfzcguefnjpllgwzddkld / Build / Intermediates / ArchiveIntermediates / Alter-App \ Store / IntermediateBuildFilesPath / Alter.build / App \ Store-iphoneos / Alter.build / Objects-normal / armv7 / Alter.LinkFileList -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak -lSystem -force_load / Users / gull / Library / Developer / Xcode / DerivedData / Alter-arpezfgnfzcguefnjpllgwzddkld / Build / Intermediates / ArchiveIntermediates / Alter-App \ Store / BuildProductsPath / App \ Store-iphoneos / libCordova.a -ObjC -fobjc -rc -fobjc-link-runtime – miphoneos-version-min = 6.0 -framework AssetsLibrary / Users / guled / Library / Developer / Xcode / DerivedData / Alter-arpezfgnfzcguefnjpllgwzddkld / Build / Intermediates / ArchiveIntermediates / Alter-App Store / BuildProductsPath / Release-iphoneos / libCordova.a -framework CoreGraphics -framework MobileCoreServices -framework CoreLocation -Xlinker -dependency_info -Xlinker / Users / guled / Library / Developer / Xcode / DerivedData / Alter-arpezfgnfzcguefnjpllgwzddkld / Build / Intermediates / ArchiveIntermediates / Alter-App Store / IntermediateBuildFilesPath / Alter.build / App \ Store / iphone / Alter.build / Objects-normal / armv7 / Alter_dependency_info.dat -o / Users / guled / Library / Developer / Xcode / DerivedData / Alter-arpezfgnfzcguefnjpllgwzddkld / Build / Intermediates / ArchiveIntermediates / Alter-App \ Store / IntermediateBuildFilesPath / Alter.build / App \ Store-iphoneos / Alter.build / Objects-normal / armv7 / Alter

这个错误也是:

ld:file not found:/ Users / guled / Library / Developer / Xcode / DerivedData / Alter-arpezfgnfzcguefnjpllgwzddkld / Build / Intermediates / ArchiveIntermediates / Alter-App Store / BuildProductsPath / App Store-iphoneos / libCordova.a clang:error:linker command退出代码1失败(使用-v查看调用)

有人能帮我吗?

这个问题让我疯狂了几个小时。 应用程序生成并运行良好。 无法创build存档。 Cordova 3.5和Xcode 5.1.1。

通过使用Somnibyte的评论中的解决scheme,我能够解决此问题。 我正在创build一个“Distribution”构buildconfiguration(就像我经常这样做),而且我无法从这个“Distribution”configuration创build一个存档。 花了几个小时修补和尝试。 我终于find了Somnibyte的评论,试图简单地归档“发布”构buildconfiguration,而… BAM! 有效! 谢谢谢谢谢谢Somnibyte。 希望这能节省一些别人的时间。

我认为这个问题可能在这里:

CordovaLib.xcodeproj

你有没有尝试手动将libcordova.a文件添加到xcode项目? 这就是我所能想到的,我自己也没有经验。

这里的错误似乎是Xcode只是找不到libcordova.a,所以这个链接可能会有所帮助。

https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/Articles/AddingaLibrarytoaTarget.html