In the build phases settings of the xcode project, you can add the framework and dylib that the project depends on in the "link binary with libraries" section.
There is no problem with the former, and the latter will find that there are multiple different options, for example, to add the Z Library:
You can see four options, three of which have version numbers. Why? How to choose?
Take ios6 SDK as an Example
CD/applications/xcode. APP/contents/developer/platforms/iphoneos. Platform/developer/sdks/iphoneos6.1.sdk/usr/liyun-l
We can see that
Lrwxr-XR-x 1 root wheel 16 3 15 libz.1.1.3.dylib-> libz.1.2.5.dylib-rwxr-XR-x 1 root wheel 140576 3 15 hour-XR-x 1 root wheel 16 3 15 libz.1.dylib-> libz.1.2.5.dyliblrwxr-XR-x 1 root wheel 16 3 15 libz. dylib-> libz.1.2.5.dylib
Only libz.1.2.5.dylib is an object, and others are soft connections to this object.
Understand the dynamic library mechanism. In Linux, It is the so-name mechanism, which is similar in IOS.
Therefore, when adding a library, it is best to add libz.1.dylib and other libraries with only the main version number for better maintenance.
The end.