How can I disable ARC for a single file in a project?

前端 未结 18 2876
星月不相逢
星月不相逢 2020-11-21 04:31

I am using ARC successfully in my project. However, I have encountered a few files (e.g., in unit tests and mock objects) where the rules of ARC are a little more fragile ri

18条回答
  •  抹茶落季
    2020-11-21 05:23

    1. Select Xcode project
    2. Go to targets
    3. Select the Build phases section
    4. Inside the build phases section select the compile sources.
    5. Select the file which you do not want to disable ARC and add -fno-objc-arc

    Disable ARC for a particular file

提交回复
热议问题