I'm aware that you can set the compiler flag -fno-objc-arc
to disable Automatic Reference Counting (ARC) for each file in Compile Sources in XCODE but how can I do this for an entire group of files without having to do each file at a time?
The reason I ask is that I've added a large library to my application and I need to set the -fno-objc-arc
compiler flag for over 100 files.
You can disable ARC for a specific class using the -fno-objc-arc compiler flag for that class. In Xcode, in the target Build Phases tab, open the Compile Sources group to reveal the source file list. Double-click the file for which you want to set the flag, enter -fno-objc-arc in the pop-up panel, then click Done.
Goto Build Phases -> Compile sources
select multiple files holding command ⌘ and press enter then add the value -fno-objc-arc
It will reflect for all the selected files.
I do not think that XCode lets you set this flag for a folder or a group, but you have two reasonable alternatives to setting the flag on individual files:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With