We build and deploy a dynamic framework that contains objective-c code. It consumes a "core" static library that contains C/C++ code. But we only consume it through the C interfaces. We don't have any Objective-C++ that we use to consume any of the C++ interfaces. It's all Objective-C in our framework consuming and linking in a static library through pure C headers.
We are wondering if it is safe to consume the "core" static library if we build it with an older version of Xcode (LLVM). And if so, is it safe even for major version differences of compiler or minor only?
thanks
We are wondering if it is safe to consume the "core" static library if we build it with an older version of Xcode (LLVM). And if so, is it safe even for major version differences of compiler or minor only?
thanks
If the library is one you control with an Xcode project, you should configure your build to depend on the static library target so that it's built with the right configuration at each build.
If the library is pre-compiled, the best practice is to recompile all libraries with each major compiler version (as a static library in an XCFramework to correctly handle simulator / device / Mac Catalyst differences). While the library might work as-is, recompiling routinely avoids any major problems as well as highlights any maintenance you need to do, such as replacing deprecated APIs. As an example by the way of history, Xcode 6, addressed an issue regarding the C++ ABI, but which required clients of the binary framework to make some considerations for the library's ABI. You can search the Xcode 6 release notes for "ABI" if you're curious about the details.
If the library is pre-compiled, the best practice is to recompile all libraries with each major compiler version (as a static library in an XCFramework to correctly handle simulator / device / Mac Catalyst differences). While the library might work as-is, recompiling routinely avoids any major problems as well as highlights any maintenance you need to do, such as replacing deprecated APIs. As an example by the way of history, Xcode 6, addressed an issue regarding the C++ ABI, but which required clients of the binary framework to make some considerations for the library's ABI. You can search the Xcode 6 release notes for "ABI" if you're curious about the details.