xcode 将通配符包标识符转换为单个 ID

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1912824/
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-14 19:00:47  来源:igfitidea点击:

Converting wildcard bundle identifier to single ID

iphonecocoa-touchxcodeapp-store-connect

提问by 4thSpace

I have an app in the app store that uses a wildcard bundle identifier. I want to implement in-app purchashing , which requires a non wildcard ID. How do I convert the wildcard ID of an existing app to a static ID for in-app purchase and push notification?

我在应用程序商店中有一个使用通配符包标识符的应用程序。我想实现应用内购买,这需要一个非通配符 ID。如何将现有应用的通配符 ID 转换为应用内购买和推送通知的静态 ID?

回答by bovine

The bundle identifier for an app must always remain the same between updates, but the AppID can actually be different. So all you need to do is create a new AppID that used the same bundle identifier as the original app instead of a wild card.

应用程序的包标识符在更新之间必须始终保持不变,但 AppID 实际上可以不同。因此,您需要做的就是创建一个新的 AppID,该 AppID 使用与原始应用程序相同的包标识符而不是通配符。

Apps that use a wildcard still need a normal bundle identifier. The wildcard AppID lets you use any bundle identifier you like, but it still needs one.

使用通配符的应用程序仍然需要一个普通的包标识符。通配符 AppID 允许您使用任何您喜欢的包标识符,但它仍然需要一个。

http://developer.apple.com/library/ios/#qa/qa1713/_index.htmlhttps://developer.apple.com/library/ios/#technotes/tn2259/_index.html

http://developer.apple.com/library/ios/#qa/qa1713/_index.html https://developer.apple.com/library/ios/#technotes/tn2259/_index.html

回答by David Maymudes

You don't actually need to change the app's id, you just need to make a new provisioning file for the specific id you've already shipped, and then sign the upgraded version of your app with the new code-signing certificate.

您实际上不需要更改应用程序的 id,您只需要为您已经提供的特定 id 创建一个新的配置文件,然后使用新的代码签名证书对您的应用程序的升级版本进行签名。

That is, if the old app's bundle id was com.yourcompany.myapp, and signed with a com.yourcompany.* certificate, you just make a new com.yourcompany.myapp certificate, but you leave the app's bundle identifier the same as before.

也就是说,如果旧应用程序的捆绑包 ID 是 com.yourcompany.myapp,并使用 com.yourcompany.* 证书签名,您只需创建一个新的 com.yourcompany.myapp 证书,但应用程序的捆绑包标识符与以前相同.

回答by Tammen Bruccoleri

In short you can convert an already submitted app that uses a wildcard bundle ID to a unique App ID. However, you're going to have some issue(s), or fallout from a user standpoint if you do so.

简而言之,您可以将使用通配符捆绑包 ID 的已提交应用程序转换为唯一的应用程序 ID。但是,如果您这样做,您将遇到一些问题或从用户的角度来看的后果。

Apple uses bundle ID's to identify apps on the app store (hence the term App ID :-)).

Apple 使用捆绑 ID 来识别应用商店中的应用(因此称为 App ID :-))。

The problem that you're facing is that your app is already up on the App Store with possible user downloads. Now when you update your application with the new unique App ID, the users that have already downloaded your application (with the old App ID) will not get the update (with the new unique App ID).

您面临的问题是您的应用程序已经在 App Store 上架,并且可能有用户下载。现在,当您使用新的唯一 App ID 更新您的应用程序时,已经下载您的应用程序(使用旧 App ID)的用户将无法获得更新(使用新的唯一 App ID)。

The reason why this happens is that you now have a new bundle ID in your application. With no connection to the old App ID. Since apps can only have one reference to an App ID. It's usually a good idea to keep an App ID the same throughout the production release, and updates of your application.

发生这种情况的原因是您的应用程序中现在有了一个新的包 ID。与旧的 App ID 没有联系。由于应用程序只能有一个对应用程序 ID 的引用。在整个生产版本和应用程序更新期间,保持 App ID 相同通常是一个好主意。

If you create a unique ID for your App (which you can). Users that download the new updated app everything will be all fine and dandy, but for the users that downloaded your app before the update. Well... you have now officially created an app orphan for those users, these users will never get that update since it doesn't match the App ID.

如果你为你的应用程序创建了一个唯一的 ID(你可以)。下载新的更新应用程序的用户一切都会好起来的,但对于在更新之前下载您的应用程序的用户而言。嗯...您现在已经正式为这些用户创建了一个孤立的应用程序,这些用户将永远不会获得该更新,因为它与应用程序 ID 不匹配。

As far as there being a way around this. I'm not sure if there is. I can only suggest that you ALWAYScreate unique App ID's for your future production release applications.

只要有办法解决这个问题。我不确定是否有。我只能建议您始终为您未来的生产版本应用程序创建唯一的 App ID。



In order to create an application that allows you to use Apple's Push Notificationservice, and Apple's In App Purchase. You will need to create an App ID that is a unique App ID. I would always recommendthat you use unique ID's for your applications. It will save you a ton of headaches later on down the road.

为了创建一个应用程序,允许您使用Apple 的 Push Notification服务和 Apple 的In App Purchase。您需要创建一个唯一的 App ID 的 App ID。我始终建议您为应用程序使用唯一 ID。以后在路上,它会为您省去很多麻烦。

For clarification purposes the following are unique ID's

为澄清起见,以下是唯一 ID

  • com.companyname.appname (preferred naming convention for unique App ID's)
  • appname.companyname
  • com.companyname.appname(唯一 App ID 的首选命名约定)
  • 应用名称.公司名称