Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add ARC for specific file?

I created a project without ARC. I want to use a third party SDK in my project. That SDK comes with ARC Support. So I want to add ARC for that third party files. I can disable ARC for all "MYProject" files by adding this flag into build phases like -fno-objc-arc.

But I may use large number of files. So it's better to add ARC for specific SDK only. So how to add ARC support for single or specific SDK files in XCode Project?

For Instance: I want to use Grid View. I'm adding GMGridView in my project and it comes with ARC support.

like image 857
Dinesh Raja Avatar asked Jan 07 '12 07:01

Dinesh Raja


1 Answers

Add the flag -fobjc-arc to the files that you'd like to use ARC. It's just the opposite of the other.

like image 126
Jason Coco Avatar answered Sep 28 '22 16:09

Jason Coco