本文介绍了如何保存所有我的构建设置从1 xcode项目和使用它们在其他xcode项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用xcode 4.5和cordova / phonegap来构建我的应用程序。我投入了大量的时间来获得正确的xcode项目的构建设置,我想重用这些设置在我正在建设的多个应用程序。我想看看是否有一个快速的方式导出这些设置或构建一个模板,我可以用于未来的项目。

I'm using xcode 4.5 and cordova/phonegap to build my apps. I have invested a lot of time into getting the build settings just right for my xcode project and I would like to reuse these settings on multiple apps I am building. I'm looking to see if there is a fast way to export these settings or build a template that I can use for future projects.

我试过复制项目文件夹并更改名称,但不起作用。我在使用cordovalib.xcodeproj文件时遇到错误。

I've tried copying the project folder and changing the name and that does not work. I get an error when working with the cordovalib.xcodeproj file.

任何导出这些设置或创建模板的帮助都将不胜感激。

Any help on exporting these settings or creating a template would be appreciated.

推荐答案

使用.xcconfig文件。

Use an .xcconfig file.

文件..新文件..然后从其他部分选择配置设置文件。

File.. New File.. Then choose the Configuration Settings File from the Other section.

您必须从xcodeproj文件中复制构建设置。在文本编辑器中打开xcodeproj文件并复制:

You will have to copy the build settings from your xcodeproj file. Open your xcodeproj file in a text editor and copy:

buildSettings = { ... }

进入您的xcconfig文件。请注意,xcconfig文件具有特定的格式。以上视频/ Apple文档应该可以帮助你。

Into your xcconfig file. Be aware that the xcconfig file has a specific format. The above video / Apple documentation should help you.

然后你需要告诉Xcode哪个xcconfig文件用于每个构建配置..调试,发布等。可以通过在项目的信息选项卡下的配置下导入它。

You will then need to tell Xcode which xcconfig file to use for each build configuration.. Debug, Release, etc. You can do this by importing it under your Project's Info tab, under Configurations.

这篇关于如何保存所有我的构建设置从1 xcode项目和使用它们在其他xcode项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 09:34