app ID 和 bundle ID 有什么区别?Xcode 项目中的应用 ID 在哪里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4271884/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:36:42  来源:igfitidea点击:

What is the difference between the app ID and the bundle ID? Where is the app ID in the Xcode project?

iphonexcode

提问by user255607

In the pList file, there is a bundle ID of the form com.mycompany.myapp, but Apple also provides an app ID on the developer portal.

在 pList 文件中,有一个形式为 com.mycompany.myapp 的 bundle ID,但 Apple 还在开发者门户上提供了一个应用 ID。

Thus, basically, what is the use of the bundle ID? Where can we find the app ID in the Xcode project?

因此,基本上,bundle ID 的用途是什么?我们在 Xcode 项目中在哪里可以找到应用 ID?

回答by Bruno Bronosky

Answers to OP Questions

OP问题的答案

What is the difference between the app ID and the bundle ID?

app ID 和 bundle ID 有什么区别?

Because most people think of the App ID as a string, they think it is interchangeable with Bundle ID. It appears this way because once the App ID is created in Member Center you only ever use the App ID Prefix which matches the Bundle ID of the Application Bundle

因为大多数人认为 App ID 是一个字符串,他们认为它可以与 Bundle ID 互换。之所以出现这种情况,是因为一旦在会员中心创建了 App ID,您就只能使用与应用程序包的包 ID 匹配的 App ID 前缀

Where is the app ID in the Xcode project?

Xcode 项目中的应用 ID 在哪里?

You don't find the App ID in Xcode. It is an object (not just a string) in Member Center. Xcode is where the Bundle ID is found. It is specified when creating a new project. (screenshot below) Each Target in a project will have a unique Bundle ID. It can be found/changed by selecting the project in the Project Navigator the choosing the Target and either General or Info from the Jump Bar.

The Xcode interface is described hereor here(depending on how Apple is feeling that day).

您在 Xcode 中找不到 App ID。它是会员中心中的一个对象(不仅仅是一个字符串)。Xcode 是 Bundle ID 所在的位置。创建新项目时指定。(下面的屏幕截图)项目中的每个 Target 都将有一个唯一的 Bundle ID。可以通过在项目导航器中选择项目、从跳转栏中选择目标和常规或信息来找到/更改它。

Xcode 界面在此处此处描述(取决于 Apple 当天的感受)。

What is the use of the bundle ID?

捆绑ID有什么用?

It uniquely defines each App. It is specified in Xcode. A single Xcode project can have multiple Targets and therefore output multiple apps. A common use case for this is an app that has both lite/free and pro/full versions or is branded multiple ways.

它唯一地定义了每个应用程序。它在 Xcode 中指定。一个 Xcode 项目可以有多个 Targets,因此可以输出多个应用程序。一个常见的用例是具有精简版/免费版和专业版/完整版或以多种方式标记的应用程序。

.

.



Definitions

定义

  1. App ID

    Think of this as an object in Member Center with lots of metadata including:

    • App ID Description
    • App ID Prefix
    • App ID Suffix
    • App Services
  2. App ID Description

    Alphanumeric plus spaces

    Sometimes you are shown this instead of the App ID, or a dropdown is sorted by this App ID

    (I always make this the same as the App ID with the dots changed to spaces)

  3. App ID Prefix

    Select from a list of available hashes in the Team ID format (see below)

    You pretty much always want to select the one labeled "(Team ID)"

  4. App ID Suffix

    A reverse-domain name style string

    This must match the Bundle ID specified in Xcode

  5. Explicit App ID

    Describes an App ID with an App ID Suffix that contains no wildcards

    Can only be associated with a single app (by exactly matching a Bundle ID)

    Compatible with all App Services

  6. Wildcard App ID

    Describes an App ID with an App ID Suffix that ends with an asterisk

    Can be associated with multiple apps (matched similar to CLI/bash shell wildcard matching)

    Not compatible with Game Center, In-App Purchase, or Push NotificationsApp Services

  7. App Services

    A combination of

    • Data Protection
    • Game Center
    • iCloud
    • In-App Purchase
    • Inter-App Audio
    • Passbook
    • Push Notifications
  8. Team ID

    A 10 character alphanumeric hash

    Unique to every Developer Account (as in the account that costs $99/yr, not every developer on the account)

  9. Apple ID

    A unique integer assigned by Apple when an app is first created in iTunes Connect.

  10. Bundle ID

    A reverse-domain name style string

    Defined in Xcode

    Uniquely identifies an Application Bundle on a device or simulator

    Must have a matching App ID registered with Apple in order to deploy

    Used to distinguish app updates vs. new apps

  11. Application Bundle

    The result of the Build process in Xcode. Though it has an extention of .ipa it is a zip file. The content is a very specific directory structure and holds everything the App needs. It looks like someone took a Mac .app file from /Applications, put in a directory named Payload, zipped it, then change the extension.

  12. Target

    Every Xcode project has at least 1 target. Each target specifies an app that can be built from the project.

  13. SKU

    Apple allows you to store a Stock Keeping Unitstring (alphanumeric, cannot have spaces) for each app in iTunes Connect. Apple doesn't do anything with this except display it on reports generated for your record keeping.

  1. 应用程序 ID

    将此视为会员中心中的一个对象,其中包含许多元数据,包括:

    • 应用 ID 描述
    • 应用 ID 前缀
    • 应用 ID 后缀
    • 应用服务
  2. 应用 ID 描述

    字母数字加空格

    有时你会看到这个而不是 App ID,或者下拉列表按这个 App ID 排序

    (我总是把它和 App ID 一样,点变成空格)

  3. 应用 ID 前缀

    从 Team ID 格式的可用哈希列表中选择(见下文)

    您几乎总是想选择标有“(团队 ID)”的那个

  4. 应用 ID 后缀

    反向域名样式字符串

    这必须与 Xcode 中指定的 Bundle ID 匹配

  5. 显式应用程序 ID

    使用不包含通配符的 App ID 后缀描述 App ID

    只能与单个应用相关联(通过与 Bundle ID 完全匹配)

    与所有应用服务兼容

  6. 通配符应用程序 ID

    使用以星号结尾的 App ID 后缀描述 App ID

    可以关联多个应用程序(匹配类似于 CLI/bash shell 通配符匹配)

    Game CenterIn-App PurchasePush NotificationsApp Services不兼容

  7. 应用服务

    组合

    • 数据保护
    • 游戏中心
    • 在应用程序内购买
    • 应用间音频
    • 存折
    • 推送通知
  8. 团队标识

    一个 10 个字符的字母数字哈希

    每个开发者帐户都是独一无二的(例如在费用为 99 美元/年的帐户中,并非帐户中的每个开发者)

  9. 苹果ID

    在 iTunes Connect 中首次创建应用程序时由 Apple 分配的唯一整数。

  10. 捆绑 ID

    反向域名样式字符串

    在 Xcode 中定义

    唯一标识设备或模拟器上的应用程序包

    必须具有在 Apple 注册的匹配 App ID 才能部署

    用于区分应用更新与新应用

  11. 应用程序包

    在 Xcode 中构建过程的结果。虽然它的扩展名为 .ipa,但它是一个 zip 文件。内容是一个非常具体的目录结构,包含应用程序所需的一切。看起来有人从 /Applications 获取了一个 Mac .app 文件,放入一个名为 Payload 的目录中,压缩它,然后更改扩展名。

  12. 目标

    每个 Xcode 项目至少有 1 个目标。每个目标指定一个可以从项目构建的应用程序。

  13. 单品

    Apple 允许您在 iTunes Connect 中为每个应用程序存储一个Stock Keeping Unit字符串(字母数字,不能有空格)。除了在为您的记录保存而生成的报告中显示它之外,Apple 不会对此做任何事情。

.

.



Create Xcode iOS Project dialog in Xcode

在 Xcode 中创建 Xcode iOS 项目对话框

Create Xcode iOS Project screenshot

创建 Xcode iOS 项目截图

.

.



Create App ID page in Member Center

在会员中心创建 App ID 页面

Create App ID screenshot

创建 App ID 截图

.

.



App Information page in iTunes Connect

iTunes Connect 中的应用信息页面

iTunes Connect screenshot

iTunes 连接截图

回答by Chengjiong

Bundle ID is the identifier of an App, but App ID is not. App ID is the connection between App and provisioning profile.

Bundle ID 是 App 的标识符,但 App ID 不是。App ID 是 App 和配置文件之间的连接。

From "About Bundle IDs" section in here, you can see, "A bundle ID precisely identifies a single app".

此处的“关于捆绑 ID”部分,您可以看到“捆绑 ID 精确标识单个应用程序”。

And from here, you can see, "An app ID's primary use is as part of a provisioning profile; it specifies which apps are authorized by the profile to be signed and launched.".

这里,您可以看到,“应用 ID 的主要用途是作为配置文件的一部分;它指定配置文件授权哪些应用程序进行签名和启动。”。

App ID has 2 parts: "bundle seed ID" and "bundle ID search string". Bundle seed IDmakes Apps share keychain data, that is to say, it's the key chain entry of Apps which have the same bundle seed ID. Bundle ID search stringdefines how many Apps are covered by this App ID. If you use a Wildcard App ID, that means many Apps will be authorized by the provisioning profile associated with this App ID. For more details please refer to here.

App ID 有两部分:“bundle 种子 ID”和“bundle ID 搜索字符串”。 Bundle Seed ID使 App 共享钥匙串数据,也就是说,它是具有相同捆绑种子 ID 的 App 的钥匙串入口。 Bundle ID 搜索字符串定义了此 App ID 涵盖的 App 数量。如果您使用通配符 App ID,这意味着许多 App 将通过与此 App ID 关联的配置文件进行授权。有关详细信息,请参阅此处

回答by mustafa

Simply, A bundle ID precisely identifies a single app. A bundle ID is used during the development process to provision devices and by the operating system when the app is distributed to customers.

简单地说,一个 bundle ID 精确地标识了一个单一的应用程序。在开发过程中使用捆绑 ID 来配置设备,并在将应用分发给客户时由操作系统使用。

During the development process, you use an app's bundle ID in many different places to identify the app. enter image description here

在开发过程中,您在许多不同的地方使用应用程序的包 ID 来标识应用程序。 在此处输入图片说明

Whereas, An App ID is a two-part string used to identify one or more apps from a single development team.

而 App ID 是一个由两部分组成的字符串,用于标识来自单个开发团队的一个或多个应用程序。

enter image description here

在此处输入图片说明

The Team ID is supplied by Apple and is unique to a specific development team, while the bundle ID search string is supplied by you to match either the bundle ID of a single app or a set of bundle IDs for a group of your apps.

团队 ID 由 Apple 提供,对于特定的开发团队是唯一的,而捆绑 ID 搜索字符串由您提供,以匹配单个应用的捆绑 ID 或一组应用的捆绑 ID。

There are two types of App IDs: an explicit App ID, used for a single app, and wildcard App IDs, used for a set of apps.

有两种类型的 App ID:显式 App ID,用于单个 App,和通配符 App ID,用于一组 App。

sources: Bundle ID, APP ID

来源: Bundle ID, APP ID

回答by Steven Kramer

Multiple apps can share the same App ID. The App ID does not uniquely identify an application.

多个应用程序可以共享同一个应用程序 ID。App ID 不唯一标识应用程序。

An App ID is a two-part string used to identify one or more apps from a single development team

App ID 是一个由两部分组成的字符串,用于标识来自单个开发团队的一个或多个应用程序

https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/AppID.html

https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/AppID.html

The ID that you see in iTunes Connect, which isunique across apps, is known as the application's Apple ID. I apologize for the confusion because no one at Apple will.

您在 iTunes Connect 中看到的 ID在应用程序中唯一的,称为应用程序的 Apple ID。我为造成的混乱道歉,因为 Apple 没有人会这样做。

回答by Balaji

App id is a combination of two strings, are separated by a period (.). String1 is a team id, Which is assigned to the development team.(provided by apple) String2 is a bundle id, is selected by you.

App id 是两个字符串组合,用句点 (.) 分隔。 String1 是团队 id,分配给开发团队。(由苹果提供) String2 是捆绑 id,由您选择。

App id is having two types.

App id 有两种类型。

  1. Explicit App ID:Here team id is used to match only one app with a specific bundle id. This app id is used to match one apponly. example: TEAM_ID.BUNDLE_ID

  2. Wildcard App IDs:Here team id is used to match multiple apps with multiple bundle ids. This app id is used to match multiple apps. examples: TEAM_ID.BUNDLE_ID1, TEAM_ID.BUNDLE_ID2 ...

  1. 显式应用 ID:这里的团队 ID 用于仅匹配一个具有特定捆绑包 ID 的应用。此应用 ID 仅用于匹配一个应用。示例:TEAM_ID.BUNDLE_ID

  2. 通配符应用 ID:这里的团队 ID 用于匹配具有多个捆绑包 ID 的多个应用。此应用 ID 用于匹配多个应用。示例:TEAM_ID.BUNDLE_ID1、TEAM_ID.BUNDLE_ID2 ...