I am using ARC successfully in my project. However, I have encountered a few files (e.g., in unit tests and mock objects) where the rules of ARC are a little more fragile right now. I recall hearing that there was a way to disable ARC on a per-file basis, though I have been unable to find this option.
Is this possible? How do I disable ARC on a per-file basis?
use -fno-objc-arc for each file in build phases
GO to App -> then Targets -> Build Phases -> Compile Source
Now, Select the file in which you want to disable ARC
paste this snippet "-fno-objc-arc" After pasting press ENTER
in each file where you want to disable ARC.
Just use the -fno-objc-arc flag in Build Phases>Compile Sources infront of files to whom you dont want ARC to be apply.
Add flag “-fno-objc-arc”.
Simple follow steps : App>Targets>Build Phases>Compile Sources> add flag after class “-fno-objc-arc”