XCode编辑项目设置vs编辑活动目标 [英] XCode Edit Project Settings vs Edit Active Target

查看:131
本文介绍了XCode编辑项目设置vs编辑活动目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

项目"菜单下拉菜单下的这两个选项有什么区别? 通常,我只是在项目设置"中进行了调整(调整了info.plist,对吗?).

What is the difference between these 2 options under the Project menu drop-down? Normally I just adjusted things in the Project Settings (which adjusts the info.plist, right?).

今天,我需要更改项目名称.最初,我从编辑项目设置"->构建"窗口更改了Product_Name.但这并没有改变名字.

Today I needed to change the name of my project. Initially i changed the Product_Name from the Edit Project Settings -> Build window. But that didnt change the name.

然后我尝试从编辑活动目标"->构建"窗口中更改Product_Name,这似乎可以解决问题.

Then I tried changing the the Product_Name from the Edit Active Target -> Build window, and that seemed to do the trick.

那么,又有什么区别呢?当我开始以为我已经明白了一切时,XCode永远不会让我感到困惑!啊!!!

So again, what's the difference? XCode never fails to confuse me just when im beginning to think i have it all figured out! Argh!!!

推荐答案

项目设置适用于项目中的所有目标.目标设置仅适用于该特定目标.您可能只有一个目标,这会使两组设置混淆并显得多余.

Project settings apply to all targets in your project. Target settings apply only to that specific target. You likely have only a single target which can make the two sets of settings confusing and appear redundant.

如果同时为项目和目标设置了设置(以粗体显示),则目标设置将覆盖项目设置.

If a setting is set (appears in bold) for both the project and a target, the target setting overrides the project setting.

未设置的目标设置(不以粗体显示)是从项目设置继承的.未设置的项目设置(不会以粗体显示)是从Xcode的默认设置继承的.

Target settings which aren't set (do not appear in bold) are inherited from the project settings. Project settings which aren't set (do not appear in bold) are inherited from Xcode's default settings.

如果设置了一个设置(项目或目标)(显示为粗体),而您想继承该设置,请选择该设置,然后按Delete键.

If a setting (either project or target) is set (appears in bold) and you instead want to inherit that setting, select the setting and press Delete.

我建议您更喜欢使用目标设置.将项目设置用于更大的,多目标的项目,而您实际上确实希望跨目标共享设置.

I suggest you prefer using the target settings. Use the project settings for larger, multi-target projects where you really do want to share settings across targets.

这篇关于XCode编辑项目设置vs编辑活动目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆