Search code examples
iphonexcodeautomatic-ref-countingcompiler-flags

Can't add compiler flags in Xcode?


I'm trying to mark a couple of files as non-ARC. But for some reason, under Compile Sources in the Build Phases of my target, it won't let me edit them. Does anyone know what's going on? When I double click the column under Compiler Flags, the row that contains the filename is in turns grey.

Does anyone know what's going on?


Solution

  • If the files are external from external libraries you have added to your project you may want to delete them from your project, re-add them and make sure you click the "add to targets" - "your app name" check box. Then try double clicking the row again in compile sources.

    EDIT: (ANSWER) If you're on a retina macbook pro, this may be your issue. I solved it by going to the compiler flags, hitting enter/double clicking on the one I want to edit, and typing even though I can't see anything happening. Hitting enter will then finish editing the compiler flag for this row (or rows if you do a multi-select).