How to disable ARC for just a few project files?

Asked

Viewed 59 times

0

I have a project using ARC but would like to add files that are not using ARC. It is possible to do this?

1 answer

0


Yes, it is possible to disable ARC only for some files by adding the build flag -fno-objc-arc in them.

You add build flags in Targets -> Build Phases -> Compile Sources. Double-click the right column in Compiler Flags. You can also add several files by clicking , selecting them and pressing enter to open the flags edit dialog.

Exemplo Note: based in that question of the OS

Heed: Learn more about mixing ARC and not ARC in this OS question: Disable Automatic Reference Counting for Some Files

Browser other questions tagged

You are not signed in. Login or sign up in order to post.