有没有办法将xcode构建设置导出到

有没有办法将xcode构建设置导出到

本文介绍了有没有办法将xcode构建设置导出到.xcconfig文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将xcode构建设置导出到.xcconfig文件?除了将其逐行复制粘贴到文本文件之外。
谢谢!

Is it possible to export xcode build settings to .xcconfig file? Other than just copy-paste it to text file line-by-line.Thanks!

推荐答案

这回答帮助了我。

用Finder中的两个手指点击它来显示项目文件(MyProject.xcodeproj)的包内容,然后在文本编辑器中打开'project.pbxproj'文件。

Show the package contents of your project file (MyProject.xcodeproj) by two finger clicking on it in finder, then open the 'project.pbxproj' file in a text editor.

查找XCConfigurationList部分。它以 / * Begin XCConfigurationList section * / 开头。您将找到所有目标及其各自的构建配置。现在对长十六进制ID执行查找(命令-f)以查找project.pbxproj中的其他内容,您还应该在其中找到buildSettings。将buildSettings括号之间的所有内容复制并粘贴到xcconfig文件中。然后,您需要按下一些变量,特别是搜索路径列表。

Look for the section XCConfigurationList. It starts with /* Begin XCConfigurationList section */. You will find all your targets and their respective builConfigurations. Now do a find (command - f) on the long hex ID to find the other occurance in the project.pbxproj where you should also find your buildSettings. Copy and paste everything between the buildSettings brackets into your xcconfig file. You will then need to massage some of the variables, specifically the lists of search paths.

或者,您可以从命令行使用xcodebuild:

Alternatively, you can use xcodebuild from the command line:

首先列出您的方案:

xcodebuild -list

然后导出你的所需方案的设置:

Then export your desired scheme's settings:

xcodebuild -schemeschemeName-showBuildSettings>> mynew.xcconfig

然后您需要删除第一行或将其注释掉

You will then need to delete the first line or comment it out

这篇关于有没有办法将xcode构建设置导出到.xcconfig文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 22:54