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

前端 未结 18 3321
星月不相逢
星月不相逢 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条回答
  •  萌比男神i
    2020-11-21 05:27

    GO to App -> then Targets -> Build Phases -> Compile Source

    Now, Select the file in which you want to disable ARC

    paste this snippet "-fno-objc-arc" After pasting press ENTER

    in each file where you want to disable ARC.

提交回复
热议问题