Library Not found error for iOS Device in Xcode - iphone

I am trying to run my app on device but it is giving error for device working fine for iPhone simulator.
ld: warning: directory not found for option '-L/Users/Documents/TEST/../CorePlotDemo/CorePlotDemo'
ld: warning: directory not found for option '-L/Users/TEST/../CorePlotDemo/CorePlotDemo'
ld: library not found for -lsqlite3.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How To solve this error, I also tried with Library Search Path but not working .

Add library libCorePlot-CocoaTouch.a
And set path in build Setting -> Search Path -> Library Search Path -> $(inherited) "$(SRCROOT)/Libs/CorePlot"
This is the path of libCorePlot-CocoaTouch.a.

Related

ld: framework not found CouchbaseLiteSwift

I'm getting an error
ld: framework not found CouchbaseLiteSwift
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I imported CouchbaseLiteSwift.framework on a folder frameworks like image show
i also included it on embedded binaries, and on framework search path i added :
$(PROJECT_DIR)/Frameworks
/Users/user/Documents/CouchbaseLiteTest/Frameworks
$(PROJECT_DIR)
/Users/user/Documents/CouchbaseLiteTest/Frameworks/CouchbaseLiteSwift.framework
$(inherited)
But still have this error, please help

Error building archive in xcode for flutter.io app

I follow release instructions but I am getting a link error building the archive about the Reachability library not being found:
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Reachability'
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/connectivity'
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/path_provider'
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/url_launcher'
ld: library not found for -lReachability
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've played around for half a day and so far no luck resolving this - could anyone help a mac.flutter newbie out?
Opening the .xcodeproj extension file instead of the .xcworkspace worked for me.

Apple Mach-O Linker Error, after changing project name

I'm making an app in Xcode 6.1.1, and just changed the name of the app, and afterwards I'm getting this "Apple Mach-O Linker Error" build failed error.
It says "ld: file not found:", probably because it can't find the placement of some file with the new name.. Any suggestions?
ld: file not found: /Users/rb/Library/Developer/Xcode/DerivedData/Which_Club-gkgjdxflldelikaopinkdoskkers/Build/Products/Debug-iphoneos/WhichClubToUse.app/WhichClubToUse
clang: error: linker command failed with exit code 1 (use -v to see invocation)
"Which_club" is the new name of the project, and "WhichClubToUse" is the old name..
I found the solution! Under my [project]Tests -> general, i needed to select the new Host Application

ignoring file [path] missing required architecture i386 in file

I'm quite new to Xcode and Iphone development and ran into the following problem:
I opened a new project and added *.h and a *.a files (which I recived from a certain device vendor).
I get the following warning:
ld: warning: ignoring file /Users/udi/Desktop/Xcode/Xcode Projects/Scosche/libmyTrekSDK_armv7.a, missing required architecture i386 in file /Users/udi/Desktop/Xcode/Xcode Projects/Scosche/libmyTrekSDK_armv7.a (2 slices)
If I ignore the warning, and try to instanciate the class that is given to me in the header file, I get these errors:
ld: warning: ignoring file [Path/FileName.a], missing required architecture i386 in file [Path/FileName.a] (2 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_HRMonitor", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
I've checked the Framework Search Pathes (as mantioned in many other posts) and it clear.
More info:
I'm Using Xcode 4.6.1
The files are currently located at project's root folder.
I'm using a Single View Application tamplate.
Appreciate any help
This warning means that you're trying to use library made for Device (ARM) with your Simulator (i386).
You can use this terminal command to create a universal library:
lipo -create lib_arm.a lib_i386.a -output lib_universal.a
More info about lipo command here.
Change your target's "Build Settings > Build Active Architectures Only" to "No"
This is doing the same thing as Dmitry Zhukov's answer but doing it thru Xcode instead of going around its back.
If you are working with a 3rd party code, keep in mind that some SDKs may not work on the simulator. The same build error I have encountered vanished, when I ran the project on the device.

lib commonCrypto not available for iOS simulator?

I've been adding libCommonCrypto.dylib to my project to do md5 hash verification. Works all proper on the iPhone (iOS 5.1), but when I try to run it on the simulator, I get this error:
ld: library not found for -lcommonCrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm a bit clueless why this happens. I added the commonCrypto to the project target -> build phase -> link binary with libraries. Is there any additional step required to get it working also in the simulator?
You don't have to add that dynamic library. It is available by default in
iphoneOS >> usr/include
and
iphoneSimulator >> usr/include