Take the 2-minute tour ×

My project has dependent libraries that don't compile under the LLVM compiler, so my project is not compatible with ARC.

How can I include other third party libraries and source files that are ARC compatible in to my non-ARC project.

Thanks in advance.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

If you're not using LLVM your main project won't be able to use ARC at as it's a LLVM 3.0 feature.

If I was you I'd make your main project/target/app compile under LLVM and include your older external dependencies as static library dependencies. Once the static libraries are compiled the fact that they're ARC or non-ARC doesn't make a difference.

You'll need to move to Xcode workspaces that contain multiple Xcode projects, one for each of your third party libraries and have static library targets for each project. This setup allows independent build settings and greater flexibility. You'll find a lot of people create static libraries for third party things these days.

Checkout a blog post or two on setting up static libraries within an Xcode workspace, it's quite common these days.

share|improve this answer
add comment

You could add a complier flag to each compile source in the Build Phases. The flag you should add is -fobjc-arc

share|improve this answer
ARC is not available without LLVM 3.0 –  Jessedc Sep 12 '12 at 7:01
add comment

I am not sure if this can suit your needs.

share|improve this answer
add comment

Your Answer


