如何为特定文件关闭ARC [英] How can one turn ARC off for specific file
问题描述
我知道我应该将编译器标志 -fno-objc-arc
添加到XCode 4中的编译源来完成此任务。但它没有用。即使添加了标记,我仍然在我的 KeychainItemWrapper.m
文件中收到错误,声称我需要使用 __ bridge
来获取C指针。
I know I am supposed to add the compiler flag -fno-objc-arc
to the compile sources in XCode 4 to accomplish this. But it isn't working. Even with the added flag I am still getting errors in my KeychainItemWrapper.m
file claiming I need to use __bridge
for C pointers.
我的项目是ARC安全的,但Apple提供的与Keychain交互的参考不是。我想为该单个文件禁用ARC。我还缺少什么呢?
My project is ARC safe, but the Apple provided reference for interacting with the Keychain is not. I would like to just disable ARC for that single file. What else am I missing here?
推荐答案
我在4.2中在不同项目中不止一次发生这种情况,但是然后,我无法对bug报告进行足够可靠的重现。但我可以说,在我的情况下,一个干净的构建清理它。
I've had this happen more than once for me in 4.2 in different projects, but then I've not been able to reproduce it reliably enough for a bug report. But I can say in my cases, a clean build cleared it up.
这篇关于如何为特定文件关闭ARC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!