Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Unity iOS Xcode build always gives a non-ARC Xcode project. I want to have unity iOS build with ARC. How can I do that?
最简单的方法是在您的项目中激活 ARC,但告诉 XCode 仅使用“-fno-objc-arc”选项为 Unity 生成的文件停用它。这样,您可以使用 arc 编写自己的代码,但不会因自动迁移生成的代码而产生任何副作用。您可以轻松地从 unity 集成新的导出,而无需重新迁移它。
-fno-objc-arc 必须在您的项目设置 > 构建阶段 > 编译源中设置
问候