开发者

Open Source for non-ARC (Automatic Reference Counting) and ARC Users

We have some open source libraries that are distributed via开发者_如何学编程 code into other projects via git modules with Xcode. Some of the projects would remain with explicit retains/release while other projects would like to leverage Automatic Reference Counting. Is there anyway for the same source to be compilable in Xcode projects with and without ARC? Would it work if it was compiled into a static library?


If you bundle a project that compiles your open source library as a static library, and the other projects link against your static library instead of compiling the source directly, then that would work. The other projects can embed your library's project file if they want, so that your library will get compiled before theirs, or you can just distribute the static library pre-compiled.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜