lib commonCrypto not available for iOS simulator? - iphone

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

Related

building for watchOS simulator, but linking in object file built for OSX, for architecture i386

we have xcode 7.1.1, MobileFirst 7.1 and followed below link but for our hybrid application with apple watch (swift)
[https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/hello-world/configuring-a-native-ios-application-with-the-mfp-sdk/#localMethod][1]
Below is complete error received while we added WorklightAPI
"WorklightAPI/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation(WLProcedureInvocationData.o), building for watchOS simulator, but linking in object file built for iOS, for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)"
any idea how to resolve this ?
Do you build for watchOS1 or watchOS2? Currently watchOS2 is not supported

Google Admob working on simulator but build failed in real device

I have added adMob in a phonegap iOS project. It works fine in simulator But when I tried to build it in real device it shows me error and build failed.
errors message:
duplicate symbol _GAD_MD5 in:
/Users/prium/Documents/phonegap/projects/Diamond-mixer-iOS/GoogleAdmobiOS/llibGoogleAdMobAds.a(md5.o)
/Users/prium/Documents/phonegap/projects/Diamond-mixer-iOS/GoogleAdmobiOS/llibGoogleAdMobAds.a(gad_md5.o)
ld: 1 duplicate symbol for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help.
check out for Build settings-->architectures-->armv7 and armv7s. JUST put armv7
adding armv7 and armv7s to architecture should work

iOS API Kal doesn't compile with iPhone 5

I'm using the iOS Kal API in my project. When I try to compile and run the project with my iPhone 4S or the iPhone 5 Simulator, it works perfectly but when I try it with a real iPhone 5, I get this error :
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/sebliberal/Dropbox/Appli FACE 06/Version iPhone/FACE06/Twitter+OAuth/Libraries & Headers/libOAuth.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I already searched for this error and I set YES for Build Active Architecture Only but I still have the error.. What's the problem ?
Thanks :)
Read this:
Framework (RestKit) not compatible with armv7s
This:
AdMob ARMv7s support
or This:
iOS - file does not contain an armv7s slice
Or one of many answers on SO and the internet.
The short answer is you need to either update your library or remove armv7s from your supported architectures.

Library Not found error for iOS Device in Xcode

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.

Adding OCMock to a framework

A bit of background first, I am currently writing some ocunit tests for a universal framework, and now need to add OCMock to test some networking aspects of the framework. I have followed the OCMock instructions here and downloaded the sample project as a reference. I've added libOCMock.a in Link Binary with Libraries in the Build phases and added the header location to Header Search path and set the linker flags to
-ObjC
-force_load
"$(SRCROOT)/Libraries/libOCMock.a"
The error message I'm getting when I run my tests is as follows:
ld: 73 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help would be greatly appreciated