how to link libcommonCrypto.dylib in project.? - ios

I know this has been asked before but the answers at those questions don't address my solution. thats why i have to post a new question.
the problem is
previously I have linked libcommonCrypto.dylib
and built the project
the error was
ld: cannot link directly with /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system/libcommonCrypto.dylib.
Link against the umbrella framework 'System.framework' instead. for architecture armv7
after searching over the google
tried the following solutions
added libz.dylib
added SystemConfiguration.framwork
imported
it was stated at one place that i should add JavaScriptCore.framework
but in framework list of Xcode I wasn't being able to find this framework
STill
the error remains..
Any help .. what am i doing wrong ??

I had the same problem. and don't know the exact reason why this worked..
but
try this if this help.
go to Project Target >> summary tab >> see the section- Linked Frameworks and Library >> select the two libraries (libz.dylib, libcommonCrypto.dylib) >> and hit the "-" button at the bottom of the section.
now build the project..
i think it should work now, mine did.
hope it does solves your problem.. happy coding.

Add "${SDKROOT}/usr/lib/system" to your LIBRARY_SEARCH_PATHS. The other solutions do this inadvertently. That's probably why they work, but linking against JavaScriptCore.framework (for example) isn't required. You just need to expose the system libs to your project.

Related

xcode 7.1 for iOS 9 missing libc++.dylib required for Objective C Realm Static Framework

I am following this doc for integrating realm in my iOS app.
Realm static framework for iOS
My problem is in step 3. I am unable to find libc++.dylib. I find a few other .tbd ones but none of them are libc++.
I followed a few other SO posts on using the "add other" option and doing command+shift+G and find that library but it's not in that list either.
Does anyone know any workarounds?
I had the same problem. I found some kind of way around.
Go to Build Phases > Link Binary with Librairies > + > Add other
Once in the file selection window do "CMD"+Shift+G (Go to folder) and type /usr/lib/
From /usr/lib you can add : libc++.dylib and more...
Compile and have fun
This is a known issue in the Xcode 7 beta.
To work around this issue for now, please:
Delete all references to .tbd files from either your linked libraries phase, or from the copied bundle resources phase (where they sometimes will be added).
Add the library you want to link manually to the "Other Linker Flags" build settings, by adding the argument:
-l<library_name>
for each library you want to link (for example, add "-lsqlite3" (without quotes)).
For those who are curious, the .tbd files are new "text-based stub libraries", that provide a much more compact version of the stub libraries for use in the SDK, and help to significantly reduce its download size.
-- copy from link
finally, you can add -lc++ in this Other link Flags setting
I have same problem. I cannot find libc++.dylib through xcode but I found it using terminal.
You can copy or create a link to visible folder in xcode like /Users//Downloads.
Command below maybe help to fix the problem.
ln -s /usr/lib/libc++.dylib /Users/<your user>/Downloads/libc++.dylib
I had a similar issue with Realm the other week after the iOS 9 update. I know you already tried the method of going to build phases, add other, CMD + shift + G without success. However this was the method I used to locate libc++.dylib and I just checked it out again now and was able find it.
It is also worth mentioning that after you do manage to add libc++.dylib you may have build errors. In which case the fix I used was to go into your target's build settings and change Enable Bitcode to No.

xcode simultor - library not found for

I'm trying to run my ios project on the simulator but I'm told that:
ld: library not found for -lPods-.....
This is not happening if I run it on my device.
I tried looking into the search paths in my Pods project, but I didn't see anything suspicious... Maybe i'm not looking for the right thing.
Can anyone help me by telling me what should I look for?
Thanks
Ok,
I went to the Pods project file and saw that "Build Active Architecture Only" is set to Yes on debug but set to No on release... I just set it to No on both and it works...
That means that there is no libPods-....dylib in the library search path that you passed to the linker. I can't be more specific because you omitted the rest of the library name in your question. You should make sure that your library search paths are correctly pointing to where you have the iOS Simulator version of your library.

ld: library not found for -lPayPalMobile ios

i am working with xcode 6.1 on paypal integration.
i am getting following error each time when i open the project.
ld: library not found for -lPayPalMobile
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
every time i have to remove library search paths value and remove reference of paypal folder and again import it to project.
what is the problem i don't know please tell me what to do?
Edited
one thing more that if project name is "This is test" then what will be difference?
because i can see in library search paths that in first row "This" is coming in second row only "is" is there and in last (i.e. 3rd row) "test" is there.
Thank you.
Follow Below steps,
(1) Add Static library in Your project bundle.
(2) Add it in "link binary with libraries"
You need to go to your Target -> Build phase -> link binary with libraries.
as attached in below image.
(3) Give proper header search path for your linked library.
i.e. ($PROJECT_DIR)/Your path.
You can also read the steps that given in GitHub link of PayPal,
which give you proper direction.
Feel free to ask if you need more help regarding this.
As #Anuj mentioned this can be a problem related with Library Search Paths. Cocoa Pods sometimes gets a mess when updating it, or installing it again if you have it or not under Source Control.
I solved this problem right now by adding this flag under Library Search Paths:
$(inherited)
Hope it helps you
This is usually Header or Library Search Paths. It's better to use CocoaPods to manage your project dependancies. CocoaPods is the dependency manager for Objective-C projects. It has thousands of libraries and can help you scale your projects elegantly. You can import any static library using simple Podfile and command line.
Once you start using CocoaPods, you won't have to worry about header or library search paths. PayPal also has a spec in the CocoaPods Spec repository.

mach-o linker error when trying to use ASIHTTP

I'm trying to use ASIHTTP in my app.
I had some probelms importing and linking everything right, but I found all the answers here except one.
I get a "Apple mach-o linker error" for many items, all referenced from a ASIWebPageRequest class methods in a file called "ASIWebPageRequest.o".
I don't really know where to find this file and how to fix this issue,
Anyone has a clue?
Thanks,
Yonathan
Edit - Fixed it by adding libxml2.dylib to my project, for some reason it is not included in http://allseeing-i.com/ASIHTTPRequest/Setup-instructions. I just compared the frameworks included in ASIHTTPRequest demo projects to mine and found out it was missing.
Fixed it by adding libxml2.dylib to my project, for some reason it is not included in http://allseeing-i.com/ASIHTTPRequest/Setup-instructions. I just compared the frameworks included in ASIHTTPRequest demo projects to mine and found out it was missing.

vimeo advanced api for iOS

I have used OA consumer class in my app and while trying to run it i got this error and i dint understand the problem. i have added -ObjC to other linker flags also. i have searched google but dint find any related to this. I have disabled the arc and do i need to add any linker flags or is there any other problem.
can you please tell me whether there is an error in code or do i have to change the linker settings
These are linker errors -- it's finding the headers just fine, but the library is missing at link time. Make sure the OA library is in the Linked Frameworks and Libraries list for your target.
I removed this error after lots of trails, the problem in my case is the corefoundation framework is corrupted, it has shown a small question mark on it, after i carefully read the exception, it says that some files are missing from the corefoundation framework, then i removed the framework and copied a new one from another project then the errors gone.
Note: while you are removing any file, don't just remove references , move it to trash, other wise the Xcode may give you a error file already exist and cannot be copied.

Resources