I'm trying to learn a framework flow using this guide: https://www.raywenderlich.com/126365/ios-frameworks-tutorial. Created a separate cocoa framework project, moved some code there - it builds successfully, resulting in DehancerNavigation.framework file.
Now I'm trying to add this framework to another project: just created a blank project for this and added my framework to Embedded binaries in on General tab. It also appeared in Linked Frameworks and Libraries section.
General tab with added framework
Seems to be enough, but now I get a buildtime error:
Ld /Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Products/Debug/DehancerNavigationTestUsageProject.app/Contents/MacOS/DehancerNavigationTestUsageProject normal x86_64
cd /Users/yefim/Documents/Projects/DehancerNavigationTestUsageProject
export MACOSX_DEPLOYMENT_TARGET=10.13
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Products/Debug -F/Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Products/Debug -filelist /Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Intermediates.noindex/DehancerNavigationTestUsageProject.build/Debug/DehancerNavigationTestUsageProject.build/Objects-normal/x86_64/DehancerNavigationTestUsageProject.LinkFileList -Xlinker -rpath -Xlinker #executable_path/../Frameworks -mmacosx-version-min=10.13 -Xlinker -object_path_lto -Xlinker /Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Intermediates.noindex/DehancerNavigationTestUsageProject.build/Debug/DehancerNavigationTestUsageProject.build/Objects-normal/x86_64/DehancerNavigationTestUsageProject_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -Xlinker -add_ast_path -Xlinker /Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Intermediates.noindex/DehancerNavigationTestUsageProject.build/Debug/DehancerNavigationTestUsageProject.build/Objects-normal/x86_64/DehancerNavigationTestUsageProject.swiftmodule -framework DehancerNavigation -Xlinker -dependency_info -Xlinker /Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Intermediates.noindex/DehancerNavigationTestUsageProject.build/Debug/DehancerNavigationTestUsageProject.build/Objects-normal/x86_64/DehancerNavigationTestUsageProject_dependency_info.dat -o /Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Products/Debug/DehancerNavigationTestUsageProject.app/Contents/MacOS/DehancerNavigationTestUsageProject
ld: framework not found DehancerNavigation
clang: error: linker command failed with exit code 1 (use -v to see invocation).
Is there something else I need to setup to use framework in project?
Problem solved when I copied framework to my project folder instead of making a reference to it (copy items if needed checker should be set).
Related
Tried to use OpenCV library in swift.
The library forces me to implement changes below :
Otherwise, without those changes i get an error:
Also in this App i want the user to pick an image from phone's gallery. To handle it, I'm using PHPicker.
However, with Excluded Architectures set, I'm not able to pick any image from the gallery, there's buch of errors/warnings in Terminal.
Without Excluded Architectures app will crash with Error as at second screen.
Any ideas or tips ?
Error from screen
Ld /Users/Kacper/Library/Developer/Xcode/DerivedData/OpenCVTest-agzhkmtplgmvfohcejwaizkysxoy/Build/Products/Debug-iphonesimulator/OpenCVTest.app/OpenCVTest normal (in target 'OpenCVTest' from project 'OpenCVTest')
cd /Users/Kacper/Downloads/OpenCVTest
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target arm64-apple-ios12.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -L/Users/Kacper/Library/Developer/Xcode/DerivedData/OpenCVTest-agzhkmtplgmvfohcejwaizkysxoy/Build/Products/Debug-iphonesimulator -F/Users/Kacper/Library/Developer/Xcode/DerivedData/OpenCVTest-agzhkmtplgmvfohcejwaizkysxoy/Build/Products/Debug-iphonesimulator -F/Users/Kacper/Downloads/OpenCVTest -filelist /Users/Kacper/Library/Developer/Xcode/DerivedData/OpenCVTest-agzhkmtplgmvfohcejwaizkysxoy/Build/Intermediates.noindex/OpenCVTest.build/Debug-iphonesimulator/OpenCVTest.build/Objects-normal/arm64/OpenCVTest.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker #executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/Kacper/Library/Developer/Xcode/DerivedData/OpenCVTest-agzhkmtplgmvfohcejwaizkysxoy/Build/Intermediates.noindex/OpenCVTest.build/Debug-iphonesimulator/OpenCVTest.build/Objects-normal/arm64/OpenCVTest_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -stdlib\=libc++ -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/Kacper/Library/Developer/Xcode/DerivedData/OpenCVTest-agzhkmtplgmvfohcejwaizkysxoy/Build/Intermediates.noindex/OpenCVTest.build/Debug-iphonesimulator/OpenCVTest.build/Objects-normal/arm64/OpenCVTest.swiftmodule -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/Kacper/Library/Developer/Xcode/DerivedData/OpenCVTest-agzhkmtplgmvfohcejwaizkysxoy/Build/Intermediates.noindex/OpenCVTest.build/Debug-iphonesimulator/OpenCVTest.build/OpenCVTest.app-Simulated.xcent -framework opencv2 -framework CoreFoundation -framework Accelerate -framework CoreGraphics -framework AssetsLibrary -framework CoreMedia -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/Kacper/Library/Developer/Xcode/DerivedData/OpenCVTest-agzhkmtplgmvfohcejwaizkysxoy/Build/Intermediates.noindex/OpenCVTest.build/Debug-iphonesimulator/OpenCVTest.build/Objects-normal/arm64/OpenCVTest_dependency_info.dat -o /Users/Kacper/Library/Developer/Xcode/DerivedData/OpenCVTest-agzhkmtplgmvfohcejwaizkysxoy/Build/Products/Debug-iphonesimulator/OpenCVTest.app/OpenCVTest
ld: in /Users/Kacper/Downloads/OpenCVTest/opencv2.framework/opencv2(ios_conversions.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Text formating of error is not my fault!
so, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 I guess that means you need the library built for the simulator, not for the actual target device.
It works when you try compile it, using real iPhone/iPad
I am developing a react native app. When I build the project in Xcode, the build failed, and here is the error:
Ld /Users/nitieii/Library/Developer/Xcode/DerivedData/BiceUser-dedbblwkymtlkzciefxyqepnavct/Build/Products/Debug-iphonesimulator/BiceUser.app/BiceUser normal (in target 'BiceUser' from project 'BiceUser')
cd /Users/nitieii/Desktop/BiceUserAppProject/ios
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios10.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/nitieii/Library/Developer/Xcode/DerivedData/BiceUser-dedbblwkymtlkzciefxyqepnavct/Build/Products/Debug-iphonesimulator -F/Users/nitieii/Library/Developer/Xcode/DerivedData/BiceUser-dedbblwkymtlkzciefxyqepnavct/Build/Products/Debug-iphonesimulator -filelist /Users/nitieii/Library/Developer/Xcode/DerivedData/BiceUser-dedbblwkymtlkzciefxyqepnavct/Build/Intermediates.noindex/BiceUser.build/Debug-iphonesimulator/BiceUser.build/Objects-normal/x86_64/BiceUser.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker #executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/nitieii/Library/Developer/Xcode/DerivedData/BiceUser-dedbblwkymtlkzciefxyqepnavct/Build/Intermediates.noindex/BiceUser.build/Debug-iphonesimulator/BiceUser.build/Objects-normal/x86_64/BiceUser_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lDoubleConversion -lFBReactNativeSpec -lPermission-Camera -lRCT-Folly -lRCTTypeSafety -lRNAWSCognito -lRNCAsyncStorage -lRNCCheckbox -lRNGestureHandler -lRNImageCropPicker -lRNPermissions -lRNSVG -lRNScreens -lRNVectorIcons -lReact-Core -lReact-CoreModules -lReact-RCTAnimation -lReact-RCTBlob -lReact-RCTImage -lReact-RCTLinking -lReact-RCTNetwork -lReact-RCTSettings -lReact-RCTText -lReact-RCTVibration -lReact-cxxreact -lReact-jsi -lReact-jsiexecutor -lReact-jsinspector -lReact-perflogger -lReactCommon -lTOCropViewController -lYoga -lglog -lreact-native-camera -lreact-native-image-picker -lreact-native-netinfo -lreact-native-safe-area-context -lstdc++ -framework AudioToolbox -framework JavaScriptCore -framework MobileCoreServices -framework Photos -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/nitieii/Library/Developer/Xcode/DerivedData/BiceUser-dedbblwkymtlkzciefxyqepnavct/Build/Intermediates.noindex/BiceUser.build/Debug-iphonesimulator/BiceUser.build/BiceUser.app-Simulated.xcent -lPods-BiceUser -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/nitieii/Library/Developer/Xcode/DerivedData/BiceUser-dedbblwkymtlkzciefxyqepnavct/Build/Intermediates.noindex/BiceUser.build/Debug-iphonesimulator/BiceUser.build/Objects-normal/x86_64/BiceUser_dependency_info.dat -o /Users/nitieii/Library/Developer/Xcode/DerivedData/BiceUser-dedbblwkymtlkzciefxyqepnavct/Build/Products/Debug-iphonesimulator/BiceUser.app/BiceUser
ld: library not found for -lDoubleConversion
clang: error: linker command failed with exit code 1 (use -v to see invocation)
So I post this question to ask how to solve this issue and what is the main reason for this error. Thank you so much!!!!
You need to delete your DerivedData project folder:
'Xcode' -> 'Preferences' -> 'Locations' tab -> At 'Derived Data' click the open icon and delete the folder in Finder.
Then Clean build folder. Also make sure you have xcworkspace open not xcproject and also try pod deintegrate and pod install prior to this from inside the iOS dir of the project.
I am having the devil of a time with an error in XCode 7.2 the full of the build error is as follows..
Ld /Users/skrite/Library/Developer/Xcode/DerivedData/PivoTrac-endythvhjbfwtchiigrtipfugerp/Build/Products/Debug-iphonesimulator/PivoTrac.app/PivoTrac normal x86_64
cd /Users/skrite/XCode-Projects/PivoTrac
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/skrite/Library/Developer/Xcode/DerivedData/PivoTrac-endythvhjbfwtchiigrtipfugerp/Build/Products/Debug-iphonesimulator -F/Users/skrite/Library/Developer/Xcode/DerivedData/PivoTrac-endythvhjbfwtchiigrtipfugerp/Build/Products/Debug-iphonesimulator -filelist /Users/skrite/Library/Developer/Xcode/DerivedData/PivoTrac-endythvhjbfwtchiigrtipfugerp/Build/Intermediates/PivoTrac.build/Debug-iphonesimulator/PivoTrac.build/Objects-normal/x86_64/PivoTrac.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -mios-simulator-version-min=9.2 -Xlinker -objc_abi_version -Xlinker 2 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/skrite/Library/Developer/Xcode/DerivedData/PivoTrac-endythvhjbfwtchiigrtipfugerp/Build/Intermediates/PivoTrac.build/Debug-iphonesimulator/PivoTrac.build/Objects-normal/x86_64/PivoTrac.swiftmodule /Users/skrite/Library/Developer/Xcode/DerivedData/PivoTrac-endythvhjbfwtchiigrtipfugerp/Build/Products/Debug-iphonesimulator/Alamofire.framework/Alamofire -Xlinker -dependency_info -Xlinker /Users/skrite/Library/Developer/Xcode/DerivedData/PivoTrac-endythvhjbfwtchiigrtipfugerp/Build/Intermediates/PivoTrac.build/Debug-iphonesimulator/PivoTrac.build/Objects-normal/x86_64/PivoTrac_dependency_info.dat -o /Users/skrite/Library/Developer/Xcode/DerivedData/PivoTrac-endythvhjbfwtchiigrtipfugerp/Build/Products/Debug-iphonesimulator/PivoTrac.app/PivoTrac
ld: framework not found Realm for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
it is strange. I have reset my code from git a few times and there are a couple of times that it has worked (made the arrow go away) but usually not. It may have something to do with ios charts library that went missing.
The last time i got it working again was by removing (deleting) iosCharts from my project navigator, but part of it must still be there or misplaced because i did not get an error about "import Charts" and when i ran the app, it loaded a chart. However, as i am writing new code (only editing one file) the above error shows up again. I have been working on this since early yesterday. Thanks for any tips. I am very new at this.
I have a warning in my ios appTests:
Ld /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Products/Debug-iphonesimulator/exchangerateTests.xctest/exchangerateTests normal x86_64
cd /Users/Mazorati/Projects/iOS/exchangerate
export IPHONEOS_DEPLOYMENT_TARGET=8.1
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 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Products/Debug-iphonesimulator -F/Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -filelist /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Intermediates/exchangerate.build/Debug-iphonesimulator/exchangerateTests.build/Objects-normal/x86_64/exchangerateTests.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -mios-simulator-version-min=8.1 -bundle_loader /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Products/Debug-iphonesimulator/exchangerate.app/exchangerate -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Intermediates/exchangerate.build/Debug-iphonesimulator/exchangerateTests.build/Objects-normal/x86_64/exchangerateTests.swiftmodule -Xlinker -dependency_info -Xlinker /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Intermediates/exchangerate.build/Debug-iphonesimulator/exchangerateTests.build/Objects-normal/x86_64/exchangerateTests_dependency_info.dat -o /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Products/Debug-iphonesimulator/exchangerateTests.xctest/exchangerateTests
Error:
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks'
Click on your project (targets)
Click on Build Settings
Use the arrows next to your project name (right above the Basic and All buttons) the change to the Tests target
if the warning is ...for option '-L/... thats Library Search Paths, delete the stuff there
if the warning is ...for option '-F/... thats Framework Search Paths, delete the stuff there
Clean
Build
The warning i was getting was this:
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/Developer/Library/Frameworks'
My Framework Search Paths were empty so updating/deleting this + Clean + Rebuild did not work for me...
If you are in this situation, try deleting your projects test target.
I got this warning together with 44 errors about about classes not valid for i386. What helped for me was:
product clean
close Xcode
remove all files from ~/Library/Developer/Xcode/DerivedData
I receive this error when opening files from their destination in finder. However, if I open the project from X Code it works fine.
Project 'Test' file delete to solution this app.
I'm Getting this error in Xcode then I try to run my app
Ld /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator/KeyboardTests.xctest/KeyboardTests normal x86_64
cd "/Users/danielsorensen/Downloads/codecanyon-9105493-color-keyboard-universal/Color Custom Keyboard"
export IPHONEOS_DEPLOYMENT_TARGET=8.0
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 x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator -F/Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/Developer/Library/Frameworks -filelist /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Intermediates/Keyboard.build/Debug-iphonesimulator/KeyboardTests.build/Objects-normal/x86_64/KeyboardTests.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -bundle_loader /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator/Color\ Custom\ Keyboard.app/Color\ Custom\ Keyboard -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Intermediates/Keyboard.build/Debug-iphonesimulator/KeyboardTests.build/Objects-normal/x86_64/KeyboardTests.swiftmodule -mios-simulator-version-min=8.0 -Xlinker -dependency_info -Xlinker /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Intermediates/Keyboard.build/Debug-iphonesimulator/KeyboardTests.build/Objects-normal/x86_64/KeyboardTests_dependency_info.dat -o /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator/KeyboardTests.xctest/KeyboardTests
ld: file not found: /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator/Color Custom Keyboard.app/Color Custom Keyboard
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I got the same error and I solved it by following these steps:
1) Go to the project
2) On the left side bar (in the screen that appears click on Tests
3) Go to the build settings tab and look for "test host"
4) Now the path that appears in the field is probably wrong so you just need to update it to the appropriate one (In my particular case I renamed the project and some folders and so some paths were wrong)
If you still see the error then you might need to fix some other paths in the Build settings tabs.
Go to Project -- > Build Settings --> Testing --> Test Host
Remove the paths from Debug and Release and give the correct path.
If you don't know the correct path just keep it empty and then clean it and build.
This works fine for me.
I got this fixed by selecting the Tests target and searching for Bundle Loader in Build Settings and changing the product name in that path. I got this error because I have changed the Product name. The Bundle loader has the old product name in the path, so it searches for that path.
Go to project name that given on top. Click on it. Go to "New Scheme" and change the Name to whatever you want.