批量添加“-fno-objc-arc”标记到(多个)源文件 [英] Batch adding "-fno-objc-arc" flag to (multiple) source files
问题描述
将Xcode项目转换为ARC(自动引用计数)后,我需要为某些源文件(主要是第三方代码)禁用ARC。
After converting an Xcode project to ARC (Automatic Reference Counting), I need to disable ARC for some of my source files (mainly third-party code).
我知道我需要为每个文件设置-fno-objc-arc标志,但是Xcode没有给我批量编辑的选项 - 我需要手动将这个标志添加到每个文件中,这可能是单调乏味的如果你需要为多个文件设置它。
I know I need to set the "-fno-objc-arc" flag for each of these files, but Xcode doesn't give me a option for batch editing - I need to add this flag to each file manually, which may be tedious if you need to set it for multiple files.
有没有人有一个聪明的方法呢?
Does anyone have a smart approach to this?
推荐答案
选择要添加标志的那些(使用 Shift 和/或 Command )并按 Enter 显示标志编辑器。按完成将输入的标记应用于所选文件。
Select the ones you want to add the flag to (using Shift and/or Command) and press Enter to display the flag editor. Press Done to apply the entered flag(s) to the selected file(s).
教程
我已经创建了一个博文作为此过程的教程。
I have composed a blog post to serve as a tutorial for this process.
这篇关于批量添加“-fno-objc-arc”标记到(多个)源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!