2

I am using a xcode sub project inside my main project. My main project is ARC enabled but the sub project is MRC project So how can I tell the compiler that my entire sub project is not ARC supported instead setting -fno-objc for all .m files in build phase.

jailani
  • 2,260
  • 2
  • 21
  • 45

3 Answers3

3

If you want to disabled for the whole project, go to your target's build settings and set Objective-C Automatic Reference Counting to No.

Like this:

enter image description here

Soumya Ranjan
  • 4,817
  • 2
  • 26
  • 51
  • unfortunatelly, I've got an old project which is used as a subproject, which has ARC set to No, but it's still giving errors about dealloc/retain etc. it's trying to compile with ARC on. – Can Poyrazoğlu Apr 20 '15 at 20:55
  • one of the source files from the old project was accidentally added to compile sources phase of the new project, that was why, solved. nevermind. – Can Poyrazoğlu Apr 20 '15 at 20:59
2

If you want to Disable ARC for entire group of files of youe nested project

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.

Mahesh
  • 204
  • 1
  • 6
0

Try this : Goto the Target -> Build Settings -> Under Apple LLVM 6.0 - Language - Objective C -> Set Objective-C Automatic Reference Counting to NO.

user2179059
  • 326
  • 1
  • 9