问题
This is a first time I've been trying to upload binary (new version of an iOS App, not a completely new app) to the iTunes store. When I attempt to create an archive, I receive three Apple Mach-o linker errors
, which show up red in issue navigator.
This is what shows up:
ld: warning: ignoring file /Users/alinam/Library/Developer/Xcode/DerivedData/Latina_1-bklvousdwnrhhgenrxpftegwerkb/Build/Intermediates/ArchiveIntermediates/Latina 1/BuildProductsPath/Release-iphoneos/libCordova.a, file was built for archive which is not the architecture being linked (armv7s): /Users/alinam/Library/Developer/Xcode/DerivedData/Latina_1-bklvousdwnrhhgenrxpftegwerkb/Build/Intermediates/ArchiveIntermediates/Latina 1/BuildProductsPath/Release-iphoneos/libCordova.a
Undefined symbols for architecture armv7s:
"_OBJC_METACLASS_$_CDVViewController", referenced from:
_OBJC_METACLASS_$_MainViewController in MainViewController.o
"_OBJC_CLASS_$_CDVViewController", referenced from:
_OBJC_CLASS_$_MainViewController in MainViewController.o`
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)`
In one of the existing discussions I read that it might have something to do with linking binary with libraries.
Well, under Build Phases -> Link Binary With Libraries the libCordova.a shows up red (missing?)
.
If so, how and where do I get it and what do I do with it then?
Update:
I resolved the issue of not being able to archive the app by removing armv7s
and arm64
(and leaving only armv7
) in the app's Build Settings -> Architectures -> Valid Architectures
.
Now it looks like this.
I've left everything as it was under CordovaLib.xcodeproj -> Build Settings -> Architectures
, which looks like this.
So I have a new question: can I really simply remove armv7s
and arm64
from Valid Architectures without any consequences? Will the app run on all the devices it should? In all the related discussions I've read through I couldn't find a definite answer to this.
来源:https://stackoverflow.com/questions/22583690/linker-command-failed-with-exit-code-1-undefined-symbols-for-architecture-armv7