如何为特定文件关闭ARC

编程入门 行业动态 更新时间:2024-10-21 09:51:49
本文介绍了如何为特定文件关闭ARC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我知道我应该将编译器标志 -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

本文发布于:2023-11-01 01:34:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547861.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:何为   文件   ARC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!