Question: How can I put a compiler directive to exclude non-ARC code so shared code can be used with projects that use ARC and with projects that don't?

For example:

```
MyClass *myClass = [MyClass alloc]init];
...

#if NOT_USING_ARC 

[myClass release];

#endif

```

Answer: 
You can use:

```
#if __has_feature(objc_arc)
    ...
#else
    ...
#endif

```
There is a refactoring that will convert your classes to be compatible with ARC.

In XCode menu: Edit - Refactor - Convert to Objective-C ARC.

Another option is to disable ARC for individual files by adding the `-fno-objc-arc` compiler flag for those files.

You add compiler flags in Targets -> Build Phases -> Compile Sources. You have to double click on the right column of the row under Compiler Flags. You can also add it to multiple files by holding the cmd button to select the files and then pressing enter to bring up the flag edit box.