ios5 ARC 什么是从 ARC 中排除文件的编译器标志?

2023-03-25移动开发问题
3

本文介绍了ios5 ARC 什么是从 ARC 中排除文件的编译器标志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

谁能帮我记住告诉 XCode 对某些文件不使用 ARC 的标志是什么?我的项目中有几个文件被标记为这样...直到我添加了另一个文件并决定将其转换为 ARC.听起来很容易,对吧?我希望我能够简单地检查我想要的文件并让 XCode 发挥它的魔力.好吧,不是那么容易,在预检查期间它从文件中删除了所有 -Noarc 标志,现在我需要手动将标志重新应用于多个文件.

Can anyone help me remember what was the flag to tell the XCode to not use ARC for some file? I had several files in my project marked as such... Until I added another file and decided to convert that one to ARC. Sounds easy, right? I expected that I would be able to simply check a file that I want and let the XCode do it's magic. Well, not so easy, during pre-check it stripped all -Noarc flags from the files and now I need to manually re- apply the flag to several files.

这个故事的寓意是:一旦您的项目在 ARC 中并且您有一些文件标记为无 ARC,请不要从 Refactor>Convert to ARC 重新运行转换为 ARC 工具.即使预检查失败,它也不会恢复您的设置.

the moral of this story is: once your project is in ARC and you have some files marked as no ARC, do not re-run the convert to ARC tool from Refactor>Convert to ARC. It will not restore your settings even if pre-check fails.

推荐答案

我找到了答案:要从 ARC 中排除文件,请在构建阶段使用 -fno-objc-arc 标志>compile来源

I found the answer: to exclude the file from ARC, use the -fno-objc-arc flag in build phases>compile sources

这篇关于ios5 ARC 什么是从 ARC 中排除文件的编译器标志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

Cocos2D + 仅禁用 Retina iPad 图形
Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)...
2024-08-12 移动开发问题
10

没有cocos2D的xcode iphone粒子
xcode iphone particles without cocos2D(没有cocos2D的xcode iphone粒子)...
2024-08-12 移动开发问题
4

Cocos2d 人像模式在 iPhone 上不起作用
Cocos2d portrait mode not working on iPhone(Cocos2d 人像模式在 iPhone 上不起作用)...
2024-08-12 移动开发问题
2

为什么 xcode 归档成功但创建一个空的 .xcarchive 文件?
Why does xcode archive succeed but create an empty .xcarchive file?(为什么 xcode 归档成功但创建一个空的 .xcarchive 文件?)...
2024-08-12 移动开发问题
2

OpenGL vs Cocos2d:选择什么?
OpenGL vs Cocos2d: What to choose?(OpenGL vs Cocos2d:选择什么?)...
2024-08-12 移动开发问题
6

移动一个精灵时所有精灵不可见
All Sprite not visible while moving one sprite(移动一个精灵时所有精灵不可见)...
2024-08-12 移动开发问题
6