[英]Where do all the Project Name and Target Names appear to a user in an Xcode extension?
I want to create a new Xcode Source Editor Extension .我想创建一个新的 Xcode Source Editor Extension 。 This involves creating:
这涉及创建:
Both require names obviously.显然,两者都需要名称。 I'm wondering where these names appear to help me decide how much context I should add to these names.
我想知道这些名称出现在哪里可以帮助我决定应该为这些名称添加多少上下文。 For example, if it appears under a menu item of "Acme Corp", then calling it "Xcode Extensions" is sufficient.
例如,如果它出现在“Acme Corp”的菜单项下,则称它为“Xcode Extensions”就足够了。 If it doesn't appear under such name, then including Acme in the title would make sense.
如果它没有出现在这样的名称下,那么在标题中包含 Acme 是有意义的。
Furthermore, I tried changing the CFBundleDisplayName of the Target, and noticed that it doesn't update the Editor menu item name for some reason.此外,我尝试更改目标的 CFBundleDisplayName,并注意到由于某种原因它没有更新编辑器菜单项名称。
Where are all the places users will see these names and which settings control them?用户将在哪里看到这些名称以及控制它们的设置在哪里?
First, I'll define the following:首先,我将定义以下内容:
And, I'll assume you named the Application "MyApp" and the Extension "MyExtension".而且,我假设您将应用程序命名为“MyApp”,扩展名为“MyExtension”。
This sets up a project with the following options:这将设置一个具有以下选项的项目:
CFBundleName = $(PRODUCT_NAME)
Product Name = $(TARGET_NAME)
(ie MyApp
) Product Name = $(TARGET_NAME)
(即MyApp
)CFBundleName = $(PRODUCT_NAME)
(ie MyExtension
) CFBundleName = $(PRODUCT_NAME)
(即MyExtension
)CFBundleDisplayName = MyExtension
Here are all the places a user might see these names:以下是用户可能会看到这些名称的所有位置:
Application :应用:
AppTarget/BuildSettings/ProductName
This is the container.app the user installs/runs to get the extension.这是用户安装/运行以获取扩展的 container.app。
System Preferences > Extensions :系统偏好 > 扩展:
AppTarget/BuildSettings/ProductName
, in "Added Extensions". AppTarget/BuildSettings/ProductName
,在“添加的扩展”中。AppTarget/BuildSettings/ProductName
, underneath "Xcode Source Editor". AppTarget/BuildSettings/ProductName
,位于“Xcode 源代码编辑器”下方。ExtensionTarget/info.plist/CFBundleDisplayName
, in "Xcode Source Editor". ExtensionTarget/info.plist/CFBundleDisplayName
,在“Xcode 源代码编辑器”中。 Xcode > Editor menu : Xcode > 编辑器菜单:
ExtensionTarget/info.plist/CFBundleName
. ExtensionTarget/info.plist/CFBundleName
。 Some key things to note:需要注意的一些关键事项:
CFBundleName
and CFBundleDisplayName
for the ExtensionTarget appear in two different places, so they should probably be the same. CFBundleName
和CFBundleDisplayName
出现在两个不同的地方,所以它们应该是相同的。AppTarget/info.plist/CFBundleName
directly appears to have no effect in what the user sees.AppTarget/info.plist/CFBundleName
似乎对用户看到的内容没有影响。 You must use the Product Name setting instead.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.