How can I add -fobjc-arc for a lot files one time

2019-07-03 16:46发布

I want to add xmppframework to my project, how can I add -fobjc-arc to all xmpp files one time?

3条回答
欢心
2楼-- · 2019-07-03 17:13

You can't do that as far as I know. You have to do that one file at a time. You might want to look into your name.xcodeproj directory, perhaps you can edit the project.pbxproj file, though I wouldn't do that

查看更多
叼着烟拽天下
3楼-- · 2019-07-03 17:27

This isn't perfect, but is usually good enough:

  1. Select the project at the top left of the project window.
  2. Select the target.
  3. Open the build phases pane.
  4. Select "Compile Sources"
  5. Type in "xmpp" into the filter area
  6. Select the files you want.
  7. Hit Enter and then type -fobjc_arc in the dialog.
查看更多
地球回转人心会变
4楼-- · 2019-07-03 17:27

Simple, in your compiler sources select the first item that requires the flag, scroll down and click the last item while holding the shift key. Then all you have to do is double click any one of the highlighted cells and add the flag and when you hit enter it will be applied to all highlighted files.

查看更多
登录 后发表回答