Xcode:在多个人中共享相同的Bundle ID [英] Xcode: sharing the same Bundle ID among multiple people

查看:162
本文介绍了Xcode:在多个人中共享相同的Bundle ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与朋友一起开发iOS应用.我们俩都作为一个人注册了Apple开发计划(我们没有组织). 我们正在使用git,我们都希望能够从Mac上构建应用程序,但是我不能编译sinche,我的朋友已经在使用Bundle ID.在没有组织的情况下,甚至有可能都能从事同一项目?我们应该怎么做?

I'm developing an iOS app with a friend. We both enrolled for the Apple development program as a Single person (we don't have an organization). We're using git and we'd like to be both able to build the app from our Mac, but I can't compile sinche the Bundle ID is already used by my friend. Is it even possible to be both able to work on the same project without being an organization? What we should do?

谢谢

推荐答案

问题是只有一个开发人员帐户可以注册捆绑包ID. Xcode试图做的是将捆绑包ID注册到您的开发帐户中(您可以在 https://developer.apple上手动进行操作.com ).由于您的朋友已经这样做了,所以您也不能这样做.

The problem is that only one developer account can register the bundle ID. What Xcode is trying to do is register the bundle ID to your development account (as you can do manually at https://developer.apple.com). Since your friend already did this, you cannot do this as well.

您可以做的是将您的包ID的值更改为开发中的一个(最后,只有一个人可以在App Store上发布该应用),但是,这有点混乱,因为它会更改.xcodeproj,并且在使用版本控制时可能会造成真正的冲突(正如我猜您正在使用的那样).

What you can do is either change the value of your bundle ID to a development one (in the end, only one of you can release the app on the App Store) however, this is kind of messy since it'll change the .xcodeproj and can be a real conflict mess when using versioning (as I guess you are using).

另一种选择是使用.xcconfig文件,并在项目中动态定义包ID.这样,您可以在本地更改配置文件,而不必推送更改.您要做的是:

Another option is to use .xcconfig files, and define the bundle ID dynamically in your project. This way you can change your config file locally and just don't push that change. What you do is:

  1. 将新文件添加到您的项目.在iOS下选择Other,然后选择Configuration Settings File.保存文件,并将其命名为Debug.xcconfig(或任何您想要的名称).
  2. 将以下行添加到文件:BUNDLE_ID = io.example.app.
  3. 在项目浏览器"中选择您的项目,然后在PROJECT下选择项目本身.
  4. 选择Info选项卡,然后展开DebugRelease.对于DebugRelease均选择Debug选项.
  5. 现在打开您的Info.plist文件,并将Bundle Identifier(CFBundleIdentifier)的值更改为$(BUNDLE_ID).
  1. Add a new file to your project. Select Other under iOS and then select Configuration Settings File. Save the file and call it Debug.xcconfig (or whatever you want).
  2. Add the following row to the file: BUNDLE_ID = io.example.app.
  3. Select your project in the Project Navigator and then select the project itself under PROJECT.
  4. Select the Info tab and expand both Debug and Release. For both Debug and Release select the Debug option.
  5. Now open your Info.plist file and change the value of Bundle Identifier (CFBundleIdentifier) to $(BUNDLE_ID).

现在,您可以使用配置文件更改分发包ID(以及其他Xcode项目属性的内容).您可以为自己和您的朋友添加一个,每个都有自己的捆绑包ID.

Now you can change the bundle ID (and a shitload of other Xcode project properties) using the configuration file. You could add one for yourself and your friend as well, each with their own bundle ID.

尽管更改BundleID时的一个问题是APNS之类的服务无法正常工作.记住这一点.如果两者都必须能够进行测试很重要,那么请确保获得一个组织帐户.

One problem though when changing the BundleID is that services such as APNS won't work. Keep that in mind. If that is important that both should be able to test, then make sure to get an organisation account.

希望这对您有所帮助!

Hope this helped you a little bit!

这篇关于Xcode:在多个人中共享相同的Bundle ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆