CocoaPods/CocoaPods — Issue #142: Include -fobjc-arc linker flag if any pods are arc enabled
Author: subdigital
Created: 2012-02-27 19:47:18+00:00
State: open

I ran into this bug today. I have 2 pods that are arc enabled, but my project is not. When running on a 4.3 device, I'd get errors like this:

```
Undefined symbols for architecture armv7:
"_objc_storeStrong", referenced from
```

There's some detail on this issue here:
http://stackoverflow.com/questions/8756418/static-library-with-arc-support-linked-to-non-arc-project-causing-linker-errors

Apparently there's a bug in LLVM, and it may not automatically include the library that gives support to 4.3 devices. You can force it by including the linker flag `-fobjc-arc` (note: linker flag for the target, not for an individual files).

I think CocoaPods could detect this scenario and add the appropriate setting in `Pods.xcconfig`.

I don't believe this is an issue if the main project is configured to use ARC.