Error while build an app in Xcode 6 - ios

I'm having some trouble to deploy my app on my device. The code works fine with the iOS simulator, but when I try to run it on my iOS device it shows the following error:
Ld /Users/user/Library/Developer/Xcode/DerivedData/App-dpvmxvpfnnbticgaudzudnxmumqu/Build/Intermediates/App.build/Debug-iphoneos/AppTests.build/Objects-normal/arm64/AppTests normal arm64
cd "/Users/user/Documents/Demo app/App"
export IPHONEOS_DEPLOYMENT_TARGET=8.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 arm64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -L/Users/user/Library/Developer/Xcode/DerivedData/App-dpvmxvpfnnbticgaudzudnxmumqu/Build/Products/Debug-iphoneos -F/Users/user/Library/Developer/Xcode/DerivedData/App-dpvmxvpfnnbticgaudzudnxmumqu/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/Developer/Library/Frameworks -filelist /Users/user/Library/Developer/Xcode/DerivedData/App-dpvmxvpfnnbticgaudzudnxmumqu/Build/Intermediates/App.build/Debug-iphoneos/AppTests.build/Objects-normal/arm64/AppTests.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -dead_strip -bundle_loader /Users/user/Library/Developer/Xcode/DerivedData/App-dpvmxvpfnnbticgaudzudnxmumqu/Build/Products/Debug-iphoneos/App.app/App -framework XCTest -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=8.0 -Xlinker -dependency_info -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/App-dpvmxvpfnnbticgaudzudnxmumqu/Build/Intermediates/App.build/Debug-iphoneos/AppTests.build/Objects-normal/arm64/AppTests_dependency_info.dat -o /Users/user/Library/Developer/Xcode/DerivedData/App-dpvmxvpfnnbticgaudzudnxmumqu/Build/Intermediates/App.build/Debug-iphoneos/AppTests.build/Objects-normal
ld: file not found: /Users/user/Library/Developer/Xcode/DerivedData/App-dpvmxvpfnnbticgaudzudnxmumqu/Build/Products/Debug-iphoneos/App.app/App
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I can't understand what's wrong with my app. I searched on the web to try to understand what's wrong and I found the following solution:
Check if I import .h files and not .m files --> In my app all ok
Check the correct Framework --> In my app I use only the default Framework, so no problem
Check the Library search path --> In my app there are no problem about this
So what's the problem? Can you help me to fix it?

Related

Swift : library not found for -lPods , linker command failed with exit code 1 ( Xcode 7.2)

I am trying to do an app for retail store , I was using Xcode 6.3 due to library issues i tried to move to Xcode 7.2 , when i tried to upgrade and run my app , i get the following error .
The following is the error
Ld /Users/jg/Library/Developer/Xcode/DerivedData/Enrico-ecxoqwtsnrjpynfphdobukwkpjdi/Build/Products/Debug-iphonesimulator/Enrico.app/Enrico normal x86_64
cd /Users/jg/Documents/Workspace/Enrico
export IPHONEOS_DEPLOYMENT_TARGET=8.3
export PATH="/Applications/Xcode 7.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode 7.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode\ 7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode\ 7.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/jg/Library/Developer/Xcode/DerivedData/Enrico-ecxoqwtsnrjpynfphdobukwkpjdi/Build/Products/Debug-iphonesimulator -F/Users/jg/Library/Developer/Xcode/DerivedData/Enrico-ecxoqwtsnrjpynfphdobukwkpjdi/Build/Products/Debug-iphonesimulator -filelist /Users/jg/Library/Developer/Xcode/DerivedData/Enrico-ecxoqwtsnrjpynfphdobukwkpjdi/Build/Intermediates/Enrico.build/Debug-iphonesimulator/Enrico.build/Objects-normal/x86_64/Enrico.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -mios-simulator-version-min=8.3 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode\ 7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/jg/Library/Developer/Xcode/DerivedData/Enrico-ecxoqwtsnrjpynfphdobukwkpjdi/Build/Intermediates/Enrico.build/Debug-iphonesimulator/Enrico.build/Objects-normal/x86_64/Enrico.swiftmodule -lPods -Xlinker -dependency_info -Xlinker /Users/jg/Library/Developer/Xcode/DerivedData/Enrico-ecxoqwtsnrjpynfphdobukwkpjdi/Build/Intermediates/Enrico.build/Debug-iphonesimulator/Enrico.build/Objects-normal/x86_64/Enrico_dependency_info.dat -o /Users/jg/Library/Developer/Xcode/DerivedData/Enrico-ecxoqwtsnrjpynfphdobukwkpjdi/Build/Products/Debug-iphonesimulator/Enrico.app/Enrico
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've checked other "library not found for -lPods" on StackOverflow but i could not find a solution.Please help me to find a solution.
Thanks in advance

clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have project with cocoa pods and TesseractOCRiOS - XCODE 7.1 (7B91b)
While I'm building app for iPad (9.1) TesseractOCRiOS Framework failed with this Error
Building on simulator works fine..
I have tried to
Purge deriver data,
clean project,
set ENABLE_BITCODE=NO
set Build Active Architecture Only=NO
I don't understand what this error means :(
Ld /Users/whipstercz/Library/Developer/Xcode/DerivedData/sw-paperless-flbrahykkapkkfeylglxcishyehc/Build/Products/Debug-iphoneos/TesseractOCR.framework/TesseractOCR normal armv7
cd /Users/whipstercz/git/sw-paperless-app/sw-paperless/Pods
export IPHONEOS_DEPLOYMENT_TARGET=8.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 armv7 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -L/Users/whipstercz/Library/Developer/Xcode/DerivedData/sw-paperless-flbrahykkapkkfeylglxcishyehc/Build/Products/Debug-iphoneos -L/Users/whipstercz/git/sw-paperless-app/sw-paperless/Pods/TesseractOCRiOS/TesseractOCR/lib -F/Users/whipstercz/Library/Developer/Xcode/DerivedData/sw-paperless-flbrahykkapkkfeylglxcishyehc/Build/Products/Debug-iphoneos -filelist /Users/whipstercz/Library/Developer/Xcode/DerivedData/sw-paperless-flbrahykkapkkfeylglxcishyehc/Build/Intermediates/Pods.build/Debug-iphoneos/TesseractOCRiOS.build/Objects-normal/armv7/TesseractOCR.LinkFileList -install_name #rpath/TesseractOCR.framework/TesseractOCR -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -fembed-bitcode-marker -weak_library /usr/lib/libstdc++.6.0.9.dylib -llept -lstdc++ -ltesseract_all -framework Foundation -framework UIKit -fobjc-arc -fobjc-link-runtime -framework Foundation -framework UIKit -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/whipstercz/Library/Developer/Xcode/DerivedData/sw-paperless-flbrahykkapkkfeylglxcishyehc/Build/Intermediates/Pods.build/Debug-iphoneos/TesseractOCRiOS.build/Objects-normal/armv7/TesseractOCR_dependency_info.dat -o /Users/whipstercz/Library/Developer/Xcode/DerivedData/sw-paperless-flbrahykkapkkfeylglxcishyehc/Build/Products/Debug-iphoneos/TesseractOCR.framework/TesseractOCR
ld: -weak_library and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have found Error
Problem was that i had more cocoa pods dependecies.
Not all of them had ENABLE_BITCODE flag disabled

XCode Compile Error errno=22

All,
I am having trouble compiling an old project I saved to dropbox, and then downloaded to my computer after a hard drive wipe. I believe I have installed all appropriate frameworks again, but am met with the following error:
Ld /Users/jclark/Library/Developer/Xcode/DerivedData/RMAPS_Fire-axrgcesnhsncrjgrcnvuslkdxshc/Build/Products/Debug-iphonesimulator/RMAPS\ FireTests.xctest/RMAPS\ FireTests normal x86_64
cd "/Users/jclark/Desktop/RMAPS Fire v.1"
export IPHONEOS_DEPLOYMENT_TARGET=7.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 x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk -L/Users/jclark/Library/Developer/Xcode/DerivedData/RMAPS_Fire-axrgcesnhsncrjgrcnvuslkdxshc/Build/Products/Debug-iphonesimulator -F/Users/jclark/Library/Developer/Xcode/DerivedData/RMAPS_Fire-axrgcesnhsncrjgrcnvuslkdxshc/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk/Developer/Library/Frameworks -filelist /Users/jclark/Library/Developer/Xcode/DerivedData/RMAPS_Fire-axrgcesnhsncrjgrcnvuslkdxshc/Build/Intermediates/RMAPS\ Fire.build/Debug-iphonesimulator/RMAPS\ FireTests.build/Objects-normal/x86_64/RMAPS\ FireTests.LinkFileList -bundle_loader /Users/jclark/Library/Developer/Xcode/DerivedData/RMAPS_Fire-axrgcesnhsncrjgrcnvuslkdxshc/Build/Products/Debug-iphonesimulator/RMAPS\ Fire.app -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/jclark/Library/Developer/Xcode/DerivedData/RMAPS_Fire-axrgcesnhsncrjgrcnvuslkdxshc/Build/Intermediates/RMAPS\ Fire.build/Debug-iphonesimulator/RMAPS\ FireTests.build/Objects-normal/x86_64/RMAPS\ FireTests_dependency_info.dat -o /Users/jclark/Library/Developer/Xcode/DerivedData/RMAPS_Fire-axrgcesnhsncrjgrcnvuslkdxshc/Build/Products/Debug-iphonesimulator/RMAPS\ FireTests.xctest/RMAPS\ FireTests
ld: can't map file, errno=22 file'/Users/jclark/Library/Developer/Xcode/DerivedData/RMAPS_Fire-axrgcesnhsncrjgrcnvuslkdxshc/Build/Products/Debug-iphonesimulator/RMAPS Fire.app' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have checked that this is an appropriate path and have search the site and found similar errors but cannot seem to resolve this one on my own. Any help is appreciated.
XCode version 6.2 (using Mavericks)

clang: error: linker command failed with exit code 1 (use -v to see invocation) ID file not found

I know this question is asked several time, but unfortunately I am asking it again as I am not getting its solution. I am trying to solve this error from last few couple of days and I am unable to solve this.
Ld /Users/admin/Library/Developer/Xcode/DerivedData/QMS-cacudjkdofhyczasnkiyzjzfwjpc/Build/Products/Debug-iphonesimulator/QMSTests.xctest/QMSTests normal x86_64
cd "/Users/admin/Documents/iPhone Apps/Divya/QMS"
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/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.1.sdk -L/Users/admin/Library/Developer/Xcode/DerivedData/QMS-cacudjkdofhyczasnkiyzjzfwjpc/Build/Products/Debug-iphonesimulator -F/Users/admin/Library/Developer/Xcode/DerivedData/QMS-cacudjkdofhyczasnkiyzjzfwjpc/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.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.1.sdk/Developer/Library/Frameworks -filelist /Users/admin/Library/Developer/Xcode/DerivedData/QMS-cacudjkdofhyczasnkiyzjzfwjpc/Build/Intermediates/QMS.build/Debug-iphonesimulator/QMSTests.build/Objects-normal/x86_64/QMSTests.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -bundle_loader /Users/admin/Library/Developer/Xcode/DerivedData/QMS-cacudjkdofhyczasnkiyzjzfwjpc/Build/Products/Debug-iphonesimulator/QMS.app/QMS -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/admin/Library/Developer/Xcode/DerivedData/QMS-cacudjkdofhyczasnkiyzjzfwjpc/Build/Intermediates/QMS.build/Debug-iphonesimulator/QMSTests.build/Objects-normal/x86_64/QMSTests.swiftmodule -mios-simulator-version-min=8.1 -Xlinker -dependency_info -Xlinker /Users/admin/Library/Developer/Xcode/DerivedData/QMS-cacudjkdofhyczasnkiyzjzfwjpc/Build/Intermediates/QMS.build/Debug-iphonesimulator/QMSTests.build/Objects-normal/x86_64/QMSTests_dependency_info.dat -o /Users/admin/Library/Developer/Xcode/DerivedData/QMS-cacudjkdofhyczasnkiyzjzfwjpc/Build/Products/Debug-iphonesimulator/QMSTests.xctest/QMSTests
ld: file not found: /Users/admin/Library/Developer/Xcode/DerivedData/QMS-cacudjkdofhyczasnkiyzjzfwjpc/Build/Products/Debug-iphonesimulator/QMS.app/QMS
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help me,tell me the way how can I solve it.
Thank you in advance.
You may have moved the folder from one mac to another.
Old references are not finding the file.
The files which have not been detected, should be showing in RED Font color in project navigator (on the left side of xcode).
Try adding these file manually by just dragging the files directly to your project navigator.

Build error when compiling Xcode project containing iOS 8 App Extension

I'm currently trying to build an application that contains an iOS 8 app extension, but am running into a bit of an issue. Whenever I try to build and run (whether on device or in simulator), I get the following build error:
Ld /Users/Cory/Library/Developer/Xcode/DerivedData/Lockdown-aklxfnafpdlclwhfylbcjtzskpmb/Build/Products/Debug-iphoneos/Lockdown\ Auth.appex/Lockdown\ Auth normal arm64
cd "/Users/Cory/Documents/Programming/Cocoa App/Lockdown/Lockdown"
export IPHONEOS_DEPLOYMENT_TARGET=8.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 arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -L/Users/Cory/Library/Developer/Xcode/DerivedData/Lockdown-aklxfnafpdlclwhfylbcjtzskpmb/Build/Products/Debug-iphoneos -F/Users/Cory/Library/Developer/Xcode/DerivedData/Lockdown-aklxfnafpdlclwhfylbcjtzskpmb/Build/Products/Debug-iphoneos -filelist /Users/Cory/Library/Developer/Xcode/DerivedData/Lockdown-aklxfnafpdlclwhfylbcjtzskpmb/Build/Intermediates/Lockdown.build/Debug-iphoneos/Lockdown\ Auth.build/Objects-normal/arm64/Lockdown\ Auth.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #executable_path/../../Frameworks -dead_strip -ObjC -framework /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKit -e _NSExtensionMain -fobjc-arc -fobjc-link-runtime -fapplication-extension -miphoneos-version-min=8.0 -Xlinker -dependency_info -Xlinker /Users/Cory/Library/Developer/Xcode/DerivedData/Lockdown-aklxfnafpdlclwhfylbcjtzskpmb/Build/Intermediates/Lockdown.build/Debug-iphoneos/Lockdown\ Auth.build/Objects-normal/arm64/Lockdown\ Auth_dependency_info.dat -o /Users/Cory/Library/Developer/Xcode/DerivedData/Lockdown-aklxfnafpdlclwhfylbcjtzskpmb/Build/Products/Debug-iphoneos/Lockdown\ Auth.appex/Lockdown\ Auth
ld: framework not found /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is with no additional code inside of the extension target, simply creating an extension, then building gives me this error every time.
Has anyone else seen this issue before? I'm not doing anything out of the ordinary for this to be happening.
Check your today extension's Build settings > Other linker flags Xcode may have copied that from your existing app, it should be blank.

Resources