I've been working on an app for some time now and it had been giving me trouble compiling on an iPhone. Recently, it stopped compiling even on the simulator. I've browsed stack overflow and other websites for answers but I can't seem to find anything that resolves the issue. Below is the error I'm getting.
I've restored an earlier version of the entire app to see if that fixed the problem but it didn't seem to make any difference. I'm still getting the same error.
Can anyone help?
Ld /Users/beauharper/Library/Developer/Xcode/DerivedData/lynx-gbjyyjvzcpeldyadlzddtokengts/Build/Products/Debug-iphonesimulator/lynx.app/lynx normal x86_64
cd /Users/beauharper/Documents/Developer/lynx
export IPHONEOS_DEPLOYMENT_TARGET=9.2
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/beauharper/Library/Developer/Xcode/DerivedData/lynx-gbjyyjvzcpeldyadlzddtokengts/Build/Products/Debug-iphonesimulator -F/Users/beauharper/Library/Developer/Xcode/DerivedData/lynx-gbjyyjvzcpeldyadlzddtokengts/Build/Products/Debug-iphonesimulator -F/Users/beauharper/Documents/Developer/lynx/Pods/GoogleMaps/Frameworks -filelist /Users/beauharper/Library/Developer/Xcode/DerivedData/lynx-gbjyyjvzcpeldyadlzddtokengts/Build/Intermediates/lynx.build/Debug-iphonesimulator/lynx.build/Objects-normal/x86_64/lynx.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -mios-simulator-version-min=9.2 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lBolts -lFBSDKCoreKit -lFBSDKLoginKit -lParse -lParseFacebookUtilsV4 -lParseTwitterUtils -lParseUI -lc++ -licucore -lsqlite3 -lz -framework AVFoundation -framework Accelerate -framework AudioToolbox -framework CFNetwork -framework CoreBluetooth -framework CoreData -framework CoreGraphics -framework CoreLocation -framework CoreText -framework Foundation -framework GLKit -framework GoogleMaps -framework ImageIO -framework OpenGLES -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -weak_framework Accounts -weak_framework AudioToolbox -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework Foundation -weak_framework QuartzCore -weak_framework Security -weak_framework Social -weak_framework UIKit -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/beauharper/Library/Developer/Xcode/DerivedData/lynx-gbjyyjvzcpeldyadlzddtokengts/Build/Intermediates/lynx.build/Debug-iphonesimulator/lynx.build/Objects-normal/x86_64/lynx.swiftmodule -lPods -lPods-lynx -Xlinker -dependency_info -Xlinker /Users/beauharper/Library/Developer/Xcode/DerivedData/lynx-gbjyyjvzcpeldyadlzddtokengts/Build/Intermediates/lynx.build/Debug-iphonesimulator/lynx.build/Objects-normal/x86_64/lynx_dependency_info.dat -o /Users/beauharper/Library/Developer/Xcode/DerivedData/lynx-gbjyyjvzcpeldyadlzddtokengts/Build/Products/Debug-iphonesimulator/lynx.app/lynx
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After further review and fiddling, and after reviewing a similar question referenced by #damian, it seems that the solution was this:
I separated the app and the test targets in the Podfile by using
target :App do
…
end
target :AppTests do
…
end
This resulted in two new products libPods-App.a and libPods-AppTests.a, respectively and they made the previous product libPods.a obsolete. I had to remove this product from the Link Binary With Libraries Section of the Build Phases configuration of both targets.
Thanks for the input everyone!
Try deleting your Derived Data folder, restarting Xcode and and running the project again. Go to Window -> Projects and navigate to your project. There should be mention of your derived data folder. Press Delete, restart Xcode and try building it again. See if that kicks it back into high gear again.
Related
I recently updated my Xcode and reinstalled an older version for an app that is built on an older version of Xcode.
So I now have Xcode 10 as well as Xcode 9.2 installed on my computer.
I have set the default in the command line to Xcode 9.2, I have changed the location to Xcode 9.2
I have tried to load Name.xcworkspace as opposed to Name.xcodeproj in finder.
I have tried deintegrating and reinstalling my Cocoapods
And yet I keep getting this error whenever I try to build an archive.
What else can I try? I need to push a new build to the App Store, and with this bug, I can't at all.
I am also noticing that Jump to Definition does not work either, so I am assuming there must be some relationship here.
That being said, development versions of the app build fine for the simulator.
What else could be going wrong here? How do I fix this?
I've seen some questions about this, but I have done everything those other questions ask
Full error log:
Ld /Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/IntermediateBuildFilesPath/Candy.build/Release-iphoneos/Candy.build/Objects-normal/armv7/Candy normal armv7
cd /Users/andy/Desktop/Projects/pinyada-final/candy/Candy
export IPHONEOS_DEPLOYMENT_TARGET=10.0
export PATH="/Applications/Xcode 9.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode 9.2.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode\ 9.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode\ 9.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -L/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos -L/Users/andy/Desktop/Projects/pinyada-final/candy/Candy/Pods/CardIO/CardIO -L/Users/andy/Desktop/Projects/pinyada-final/candy/Candy/Pods/GoogleAnalytics/Libraries -L/Users/andy/Desktop/Projects/pinyada-final/candy/Candy/Pods/PayPal-iOS-SDK/PayPalMobile -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/ARChromeActivity -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/AeroGearHttp -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/AeroGearOAuth2 -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/Alamofire -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/AlamofireNetworkActivityIndicator -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/Bolts -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/EAIntroView -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/EARestrictedScrollView -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/EmitterKit -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/Eureka -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/FBSDKCoreKit -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/FBSDKLoginKit -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/FBSDKShareKit -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/FacebookCore -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/FacebookLogin -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/FacebookShare -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/GMStepper -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/GoogleToolboxForMac -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/KINWebBrowser -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/Koloda -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/PKHUD -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/SimpleKeychain -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/SnapKit -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/SwiftyJSON -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/TUSafariActivity -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/Unbox -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/UnboxedAlamofire -F/Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos/pop -F/Users/andy/Desktop/Projects/pinyada-final/candy/Candy/Pods/AppsFlyerFramework -F/Users/andy/Desktop/Projects/pinyada-final/candy/Candy/Pods/Button -F/Users/andy/Desktop/Projects/pinyada-final/candy/Candy/Pods/FirebaseAnalytics/Frameworks -F/Users/andy/Desktop/Projects/pinyada-final/candy/Candy/Pods/FirebaseCore/Frameworks -F/Users/andy/Desktop/Projects/pinyada-final/candy/Candy/Pods/FirebaseInstanceID/Frameworks -F/Users/andy/Desktop/Projects/pinyada-final/candy/Candy/Pods/Google/Frameworks -F/Users/andy/Desktop/Projects/pinyada-final/candy/Candy/Pods/Pushwoosh/Framework -filelist /Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/IntermediateBuildFilesPath/Candy.build/Release-iphoneos/Candy.build/Objects-normal/armv7/Candy.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -Xlinker -rpath -Xlinker #executable_path/Frameworks -miphoneos-version-min=10.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/IntermediateBuildFilesPath/Candy.build/Release-iphoneos/Candy.build/Objects-normal/armv7/Candy_lto.o -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/BuildProductsPath/Release-iphoneos -Xlinker -final_output -Xlinker /Applications/Candy.app/Candy -fobjc-link-runtime -L/Applications/Xcode\ 9.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/IntermediateBuildFilesPath/Candy.build/Release-iphoneos/Candy.build/Objects-normal/armv7/Candy.swiftmodule -ObjC -lCardIO -lGoogleAnalytics -lPayPalMobile -lc++ -lopencv_core -lopencv_imgproc -lsqlite3 -lstdc++ -lz -framework ARChromeActivity -framework AVFoundation -framework Accelerate -framework AdSupport -framework AddressBook -framework AeroGearHttp -framework AeroGearOAuth2 -framework Alamofire -framework AlamofireNetworkActivityIndicator -framework AppsFlyerLib -framework AssetsLibrary -framework AudioToolbox -framework Bolts -framework Button -framework CoreData -framework CoreFoundation -framework CoreLocation -framework CoreMedia -framework CoreMotion -framework CoreVideo -framework EAIntroView -framework EARestrictedScrollView -framework EmitterKit -framework Eureka -framework FBSDKCoreKit -framework FBSDKLoginKit -framework FBSDKShareKit -framework FacebookCore -framework FacebookLogin -framework FacebookShare -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseInstanceID -framework GGLAnalytics -framework GGLCore -framework GMStepper -framework GoogleToolboxForMac -framework KINWebBrowser -framework Koloda -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework PKHUD -framework Pushwoosh -framework QuartzCore -framework Security -framework SimpleKeychain -framework SnapKit -framework StoreKit -framework SwiftyJSON -framework SystemConfiguration -framework TUSafariActivity -framework UIKit -framework Unbox -framework UnboxedAlamofire -framework iAd -framework pop -framework AdSupport -framework iAd -framework Pods_Candy -Xlinker -dependency_info -Xlinker /Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/IntermediateBuildFilesPath/Candy.build/Release-iphoneos/Candy.build/Objects-normal/armv7/Candy_dependency_info.dat -o /Users/andy/Library/Developer/Xcode/DerivedData/Candy-dcszzxlovxhznvggxxjbcwvojdkc/Build/Intermediates.noindex/ArchiveIntermediates/Candy/IntermediateBuildFilesPath/Candy.build/Release-iphoneos/Candy.build/Objects-normal/armv7/Candy
ld: warning: Some object files have incompatible Objective-C category definitions. Some category metadata may be lost. All files containing Objective-C categories should be built using the same compiler.
ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '1000.11.45.2_0' Reader: '900.0.39.2_0')', using libLTO version 'LLVM version 9.0.0, (clang-900.0.39.2)' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Go to xCode > Prefrences > Locations, and delete all Archives and Derived Data, do a clean build and you are done.
When you build your project, Xcode invokes clang for Objective-C targets and swift/swiftc for Swift targets. Both of these compilers compile the app to an intermediate representation (IR), one of these IRs is bitcode. From this IR, a program called LLVM takes over and creates the binaries needed for x86 32 and 64 bit modes (for the simulator) and arm6/arm7/arm7s/arm64 (for the device). Normally, all of these different binaries are lumped together in a single file called a fat binary.
The ENABLE_BITCODE option cuts out this final step. It creates a version of the app with an IR bitcode binary. This has a number of nice features, but one giant drawback: it can't run anywhere. In order to get an app with a bitcode binary to run, the bitcode needs to be recompiled (maybe assembled or transcoded… I'm not sure of the correct verb) into an x86 or ARM binary.
Now, in your case some third party library must have bitcode disabled and hence you will also need you disable bitcode in your project. #Andrew
I am trying to build a very old iOS Cordova App.
It builds successfully for Simulators but, when I try to build for any real hardware, it shows error:
Ld
/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/MIND_MIS.app/MIND_MIS
normal armv7s
cd "/Users/atif/Desktop/Atif/Projects/MIS/MIND_MIS Ver 02.00.0002 Final"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
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"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk
-L/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos
-F/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos
-filelist /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS.LinkFileList
-miphoneos-version-min=7.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS_lto.o
-Xlinker -no_deduplicate -fobjc-link-runtime -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation
-weak_framework CoreMedia -weak-lSystem -force_load /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/libCordova.a
-ObjC -framework MessageUI -weak_framework CoreMotion -framework CoreLocation -framework ImageIO -framework OpenAL -framework
AssetsLibrary
/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/libCordova.a
-framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork
-framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -weak_framework
CoreMedia -framework CoreLocation -Xlinker -dependency_info -Xlinker
/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS_dependency_info.dat
-o /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/MIND_MIS.app/MIND_MIS
error: Invalid bitcode signature clang: error: linker command failed
with exit code 1 (use -v to see invocation)
I even tried using Xcode 7, 8 and also 9 but, I still get the same error.
Try:
Clear derived data and then reopen Xcode.
Select proper sign in / certificate, or try to re-add account in Xcode.
Make sure if your pods supported bitcode if not then you need to set bitcode to NO (Go to Project Build setting search for bitcode & set it to NO.
Or trying this may help you:
OR
Open Podfile
Uncomment this line ~> platform :ios, 'x.0'
From the command line run the following command where Podfile resides
pod update
In the xcode select Product > clean and then Product > Build
I encountered this error before..
Try this solution:
Go to Build Settings > Build Active Architecture Only
Make changes on the selected target
a) Set it as 'YES' if you're building/pushing the app directly to a device
b) Set it as 'NO' if you're trying to build the app as IPA
Hope it helps!
Go to project > targets > general > deployment info. Make sure your deployment target is same as your hardware's ios version
I am currently using cocoapods in my Xcode Project to create a google sign in button for my app, and after going through the tutorial steps again, there are still errors showing up on build. Here are the error messages that are showing up on build. Would appreciate any help in fixing this problem.
Short Error Message(At the end of the console error message)
ld: file not found: /Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib_external.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Full Error Message(error message above the short error message):
Ld /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator/GunnOracleApplication.app/GunnOracleApplication normal x86_64
cd /Users/tarunaarora/Desktop/GunnOracleApplication
export IPHONEOS_DEPLOYMENT_TARGET=10.2
export PATH="/Users/tarunaarora/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Users/tarunaarora/Downloads/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Users/tarunaarora/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Users/tarunaarora/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk -L/Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator -L/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/Firebase -F/Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator -F/Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator/GTMOAuth2 -F/Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator/GTMSessionFetcher -F/Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/FirebaseAnalytics/Frameworks/frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/FirebaseCore/Frameworks/frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/FirebaseInstanceID/Frameworks/frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/Google/Frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleAppUtilities/Frameworks/frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleInterchangeUtilities/Frameworks/frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleSignIn/Frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleSymbolUtilities/Frameworks/frameworks -filelist /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Intermediates/GunnOracleApplication.build/Debug-iphonesimulator/GunnOracleApplication.build/Objects-normal/x86_64/GunnOracleApplication.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -Xlinker -rpath -Xlinker #executable_path/Frameworks -mios-simulator-version-min=10.2 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Intermediates/GunnOracleApplication.build/Debug-iphonesimulator/GunnOracleApplication.build/Objects-normal/x86_64/GunnOracleApplication_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Users/tarunaarora/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Intermediates/GunnOracleApplication.build/Debug-iphonesimulator/GunnOracleApplication.build/Objects-normal/x86_64/GunnOracleApplication.swiftmodule -ObjC -lc++ -lsqlite3 -lstdc++ -lz -framework AddressBook -framework AssetsLibrary -framework CoreFoundation -framework CoreLocation -framework CoreMotion -framework CoreText -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseInstanceID -framework GGLCore -framework GGLSignIn -framework GTMOAuth2 -framework GTMSessionFetcher -framework GoogleAppUtilities -framework GoogleInterchangeUtilities -framework GoogleSignIn -framework GoogleSymbolUtilities -framework GoogleToolboxForMac -framework MessageUI -framework SafariServices -framework Security -framework StoreKit -framework SystemConfiguration -lGGLCore -lGGLSignIn -lGIPNSURL+FIFE_external -lGSDK_Overload_external -lGTMOAuth2_external_external -lGTMOAuth2_internal_external -lGTMSessionFetcher_core_external -lGTMSessionFetcher_full_external -lGTMStackTrace_external -lGTM_AddressBook_external -lGTM_DebugUtils_external -lGTM_GTMURLBuilder_external -lGTM_KVO_external -lGTM_NSData+zlib_external -lGTM_NSDictionary+URLArguments_external -lGTM_NSScannerJSON_external -lGTM_NSStringHTML_external -lGTM_NSStringXML_external -lGTM_Regex_external -lGTM_RoundedRectPath_external -lGTM_StringEncoding_external -lGTM_SystemVersion_external -lGTM_UIFont+LineHeight_external -lGTM_core_external -lGTM_iPhone_external -lOpenInChrome_external -lProtocolBuffers_external -lSignIn_external -lc++ -lsqlite3 -lstdc++ -lz -framework AddressBook -framework AssetsLibrary -framework CoreFoundation -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreText -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseInstanceID -framework GoogleToolboxForMac -framework MessageUI -framework SafariServices -framework Security -framework StoreKit -framework SystemConfiguration -force_load /Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib_external.a -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Intermediates/GunnOracleApplication.build/Debug-iphonesimulator/GunnOracleApplication.build/GunnOracleApplication.app.xcent -framework Pods_GunnOracleApplication -Xlinker -dependency_info -Xlinker /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Intermediates/GunnOracleApplication.build/Debug-iphonesimulator/GunnOracleApplication.build/Objects-normal/x86_64/GunnOracleApplication_dependency_info.dat -o /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator/GunnOracleApplication.app/GunnOracleApplication
This is what my Xcode Project Podfile document and Pods show up like:
I am also currently using Xcode 8.2 beta
EDIT:
At the end I have including my solution as to what I did to fix the problem since most of the other ones had not worked. Feel free to look at the solution.
In your podfile, notice the difference between ` to '.
Once this is corrected, you can:
a. Clean the project (product -> clean)
b. Close XCode
c. Run pod install
d. Open yourProjectName.xcworkspace
Open Build Settings
Go to Framework Search Paths
This inherited & Project Directory will cause automatically detection from Pods, and it will not more create problem for you. Try to do so it will automatically detect the pod. Might be this can help
You should change the scheme name. Delete old scheme and add new one!
You can autocreate schemes for your targets by going to Product > Scheme > Manage Schemes and pressing "Autocreate Schemes Now"
Reference : this so post
After reading the solutions above, none of them had worked for me, so I started experimenting myself to see if there were any other solutions to this problem.
Here are the steps that had led me to solving this problem:
Recreating the Project. (I copied the files I needed and left out the ones I didn't need, so I only copied the Main.storyboard and Assets files)
Installing the Pods correctly. (I went through the tutorial I was using again and made sure I was installing the same exact pods he was installing. The project builded without any errors.)
Coding the ViewController.swift and Appdelegate files. (I watched the tutorial again, and carefully re-wrote the code that he was writing in the tutorial)
Building the project and understanding the errors. (I built the project using the correct scheme settings and then I had went through any errors shown in the console, and corrected them.) All errors that I had encountered, had solutions in the tutorial.
Now the project has been successfully created without any errors!
When I build my project targeting the simulator, it builds fine. However when I target my device running iOS 9, I receive the following error:
Linker command failed with exit code 1
Along with a Directory not found for option warning.
How can I solve this?
Edit : Full Error log
Ld /Users/gbs-mac/Library/Developer/Xcode/DerivedData/xxxxxxx-cbqfydingfpnbjblowdpmbcgwnmp/Build/Products/Debug-iphonesimulator/xxxxx\ xxxx.app/xxxxx\ xxxx normal x86_64
cd "/Users/gbs-mac/Desktop/Swapnil/xxxxx xxxxx"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/gbs-mac/Library/Developer/Xcode/DerivedData/xxxxx-cbqfydingfpnbjblowdpmbcgwnmp/Build/Products/Debug-iphonesimulator -F/Users/gbs-mac/Library/Developer/Xcode/DerivedData/xxxxxx-cbqfydingfpnbjblowdpmbcgwnmp/Build/Products/Debug-iphonesimulator -F/Users/sumitghosh/Documents/facebookSDK -F/Users/gbs-mac/Desktop/Swapnil/xxxxxx\ xxxxx/FacebookSDK -F/Users/gbs-mac/Desktop/Swapnil/xxxxxx\ xxxxx/xxxxxx -xxxxx -F/Users/gbs-mac/Desktop/Swapnil/xxxxxx\ xxxxxx -filelist /Users/gbs-mac/Library/Developer/Xcode/DerivedData/xxxxxxxx-cbqfydingfpnbjblowdpmbcgwnmp/Build/Intermediates/Celebrity\ Face.build/Debug-iphonesimulator/xxxxxx\ xxxx.build/Objects-normal/x86_64/xxxxx\ xxxxx.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -mios-simulator-version-min=7.0 -bundle_loader /Users/gbs-mac/Library/Developer/Xcode/DerivedData/xxxxxxxx-cbqfydingfpnbjblowdpmbcgwnmp/Build/Products/Debug-iphonesimulator/MyExistingApp.app/MyExistingApp -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -framework StoreKit -framework EventKit -framework EventKitUI -framework CFNetwork -framework CoreTelephony -framework CoreMedia -framework CoreGraphics -framework SystemConfiguration -framework AVFoundation -framework AdSupport -framework AudioToolbox -framework iAd -framework Security -framework AssetsLibrary -framework MobileCoreServices -framework CoreLocation -framework MediaPlayer -framework MessageUI -framework QuartzCore -framework FBSDKShareKit -framework UIKit -framework GoogleMobileAds -framework FBSDKCoreKit -framework FBSDKLoginKit -Xlinker -dependency_info -Xlinker /Users/gbs-mac/Library/Developer/Xcode/DerivedData/xxxxxxxx-cbqfydingfpnbjblowdpmbcgwnmp/Build/Intermediates/xxxxxx\ xxxx.build/Debug-iphonesimulator/xxxxxxx\ xxxx.build/Objects-normal/x86_64/xxxxx\ Face_dependency_info.dat -o /Users/gbs-mac/Library/Developer/Xcode/DerivedData/xxxxxxxx-cbqfydingfpnbjblowdpmbcgwnmp/Build/Products/Debug-iphonesimulator/Celebrity\ Face.app/xxxxxx\ xxxxxx
ld: warning: directory not found for option '-F/Users/sumitghosh/Documents/facebookSDK'
ld: warning: directory not found for option '-F/Users/gbs-mac/Desktop/Swapnil/xxxxxxx xxxxxx/xxxxxx'
ld: warning: directory not found for option '-FFace'
ld: file not found: /Users/gbs-mac/Library/Developer/Xcode/DerivedData/xxxxxxx-cbqfydingfpnbjblowdpmbcgwnmp/Build/Products/Debug-iphonesimulator/MyExistingApp.app/MyExistingApp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In your project's build setting remove everything from Framework Search paths and Library Search paths. Clean and build.
In your menu bar, go to Product > Clean and click it. Then try rebuilding the project.
When I build an example project in openFrameworks for iOS, it becomes Apple mach-O Linker Error though I do not do anything to the project.
Whichever sample project I choose, it will be the same result.
How do I fix it?
The followings is whole error message.
Ld /Users/xxxxxx/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Products/Debug-iphonesimulator/emptyExample.app/emptyExample normal i386
cd /Applications/of_v0.8.4_ios_release/examples/ios/emptyExample
export IPHONEOS_DEPLOYMENT_TARGET=3.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/xxxxxx/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Products/Debug-iphonesimulator -F/Users/xxxxxx/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Products/Debug-iphonesimulator -filelist /Users/xxxxxx/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Intermediates/emptyExample.build/Debug-iphonesimulator/emptyExample.build/Objects-normal/i386/emptyExample.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC ../../../libs/FreeImage/lib/osx/freeimage.a ../../../libs/freetype/lib/ios/freetype.a ../../../libs/FreeImage/lib/ios/freeimage.a ../../../libs/poco/lib/ios/PocoNet.a ../../../libs/poco/lib/ios/PocoNetSSL.a ../../../libs/poco/lib/ios/PocoCrypto.a ../../../libs/poco/lib/ios/PocoXML.a ../../../libs/poco/lib/ios/PocoZip.a ../../../libs/poco/lib/ios/PocoUtil.a ../../../libs/poco/lib/ios/PocoFoundation.a ../../../libs/tess2/lib/ios/tess2.a ../../../libs/glu/lib/ios/glu.a ../../../libs/glu/lib/ios/glu-ios.a ../../../libs/openssl/lib/ios/ssl.a ../../../libs/openssl/lib/ios/crypto.a -stdlib=libstdc++ -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=3.1 -framework CoreVideo /Applications/of_v0.8.4_ios_release/libs/openFrameworksCompiled/lib/ios/libofxiOS_iphonesimulator_Debug.a -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework AudioToolbox -framework OpenAL -framework CoreLocation -framework CoreGraphics -framework AVFoundation -framework CoreMedia -framework MapKit -Xlinker -dependency_info -Xlinker /Users/xxxxxx/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Intermediates/emptyExample.build/Debug-iphonesimulator/emptyExample.build/Objects-normal/i386/emptyExample_dependency_info.dat -o /Users/teruyakusumoto/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Products/Debug-iphonesimulator/emptyExample.app/emptyExample
ld: -pie can only be used when targeting iOS 4.2 or later
clang: error: linker command failed with exit code 1 (use -v to see invocation)
As the 2nd to last line in the error message indicates, it looks like you need to set your "Deployment target" to iOS 4.2 or later. It looks you're trying to build for iOS 3.1, but a library is using API's that require 4.2 or newer.