Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: sharing the same Bundle ID among multiple people

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?

Thanks

like image 534
Stefano Giacone Avatar asked Aug 07 '16 11:08

Stefano Giacone


People also ask

Can we change the bundle identifier in Xcode?

Change the Bundle IDChoose your project from the left side, then your app target under TARGETS, select the General tab and rename the Bundle Identifier.

Is bundle ID same as package name?

The bundle ID is the unique identifier of your app. Bundle ID is the term used for iOS apps. For Android apps it is called “Package name”. A bundle ID/Package name is created automatically when you create an app.

What is Xcode bundle ID?

Overview. The bundleIds resource represents the app's unique identifier that you can register, modify, and delete. You need a bundle ID before you can assign capabilities with the Bundle ID Capabilities resource or create a provisioning profile with the Profiles resource.

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

Bundle ID is the identifier of an App, but App ID is not. App ID is the connection between App and provisioning profile. From "About Bundle IDs" section in here, you can see, "A bundle ID precisely identifies a single app".


1 Answers

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.

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).

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. 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). Xcode New File dialog
  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. Xcode project editor
  5. Now open your Info.plist file and change the value of Bundle Identifier (CFBundleIdentifier) to $(BUNDLE_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.

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!

like image 145
Paul Peelen Avatar answered Oct 13 '22 21:10

Paul Peelen