我正在使用 ObjC 来构建我的应用程序的 ui,我的应用程序依赖于 ansi c 库,我有 ansi c 库的源代码。如何使用 Xcode 编译这个应用程序(为了开发,我可以将库安装到我的 Mac 中)。但是我想在没有任何外部依赖的情况下将我的应用程序发送给用户,就像任何其他应用程序一样,用户不需要安装依赖项,那么我该如何实现呢?
1 回答
If you have static library then add the same to your Xcode project and compile application. During linking phase library is linked with Application binary and hence no separate installation required for the library.
In case library is dynamic library then check the installation path. If the library installation directory is outside application bundle then you need to create installer to install library to installation directory. On the other hand if installation directory is relative to @excutable path then you can keep the library inside your application bundle and no installation required. You can use copy file phase to copy library into your application bundle.Refer Apple documentation