简体   繁体   English

如何更改应用程序的捆绑软件ID?

[英]How do i change my app's bundle ID?

I'm making a pro version of my app and a free version, whereas i just had the free version, which is already on the app store. 我正在制作我的应用的专业版和免费版,而我只有免费版,而该版本已经在应用商店中了。 So how do i change my bundle ID for the pro version of my app. 因此,我该如何更改我应用程序专业版的捆绑软件ID。 Do i have to do something inside of xcode? 我是否必须在xcode内做一些事情?

The best way to do this is to create a new target. 做到这一点的最好方法是创建一个新目标。 In Xcode, just go to File --> New Target. 在Xcode中,只需转到File-> New Target。

This will create a separate target with a new main and info.plist. 这将使用新的main和info.plist创建一个单独的目标。 In there you can specify the app bundle ID for your pro version. 您可以在其中指定专业版的应用程序捆绑包ID。 Then in the target dropdown (the one you use to specify which to device to debug on) you can specify which target you want to debug and eventually build/submit for. 然后在目标下拉列表(用于指定要调试的设备的下拉菜单)中,可以指定要调试的目标并最终为其构建/提交。

This creates a clean separation of your Pro and Lite builds, while being able to share the code you have already created. 这样可以将Pro和Lite版本完全分开,同时可以共享您已经创建的代码。 For each of your files, you'll need to specify which (or both) targets they need to belong to. 对于每个文件,您都需要指定它们需要属于哪个(或两个)目标。

The answer above works; 上面的答案有效; however, might I suggest you use in-app purchase to activate the paid features? 但是,我是否建议您使用应用内购买来激活付费功能? That way existing users of your software will get an upgrade notification from Apple (that they should install the new version). 这样,您的软件的现有用户将收到Apple的升级通知(他们应该安装新版本)。 I imagine most users interested in paying for your paid features are the same ones who are currently using your free version. 我想大多数有兴趣为您的付费功能付费的用户与当前正在使用您的免费版本的用户相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM