iOS bundle id的作用

The default bundle ID in your Xcode project is a string formatted as a reverse-domain—for example, com.MyCompany.MyProductName. To create the default bundle ID, Xcode concatenates the organization identifier with the product name you entered when creating the project from a template, as described in Setting Properties When Creating Your Xcode Project. (Xcode replaces spaces in the product name to create the default bundle ID.) It may be sufficient to replace the organization identifier prefix in the bundle ID, or you can replace the entire bundle ID. For example, change the organization identifier prefix to match your organization domain name, or replace the entire bundle ID to match an explicit App ID.

For tvOS apps that share the iTunes Connect app record of an iOS app (described in Adding a tvOS App to an iOS App Record), the tvOS app must have the same bundle ID as the iOS app.

For watchOS apps, the embedded WatchKit app and WatchKit extension targets must have the same bundle ID prefix as the iOS target. The WatchKit app target must have the format [Bundle ID].watchkitapp and the WatchKit extension target must have the format [Bundle ID].watchkitextension. If you change the iOS app’s bundle ID, you must change the WatchKit app and WatchKit extension target’s bundle ID to match. 

For Mac apps, ensure that every bundle ID is unique within your app bundle. For example, if your app bundle includes a helper app, make sure that its bundle ID is different from your app’s bundle ID. 

Follow these steps to change the bundle ID prefix in the General pane in the project editor.

To set the bundle ID prefix

  1. In the project navigator, select the project and your target to display the project editor.

  2. Click General and, if necessary, click the disclosure triangle next to Identity to reveal the settings.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值