1
votes

I recently tried to archive my product in order to submit it to the app store, but came across this error that has eaten up my time. The error goes as follows:

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/Alter normal armv7 cd /Applications/MAMP/htdocs/Alter/platforms/ios export IPHONEOS_DEPLOYMENT_TARGET=6.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/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-arpezfgnfzcguefnjpllgwzddkld/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/guled/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App\ Store/BuildProductsPath/App\ Store-iphoneos/libCordova.a -ObjC -fobjc-arc -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-iphoneos/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

This error also follows:

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 failed with exit code 1 (use -v to see invocation)

Can someone help me?

2

2 Answers

1
votes

This issue was driving me crazy for hours. Apps builds and runs fine. Cannot create archive. Cordova 3.5 and Xcode 5.1.1.

I was able to resolve this issue by using the solution in the comments from Somnibyte. I was creating a "Distribution" build configuration (like I always do), and I was unable to create an archive from this "Distribution" configuration. Spent hours tinkering and trying. I finally found the comment from Somnibyte, attempted to simply archive the "Release" build configuration instead, and... BAM! It worked! Thank you thank you thank you Somnibyte. Hope this saves someone else some time.

I think the issue may be here:

CordovaLib.xcodeproj

0
votes

Have you tried manually adding the libcordova.a file to the xcode project? Thats all I can think of, having no experience with cordova myself.

The error here seems to be that xcode is just failing to find the libcordova.a, so this link may help some.

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