29

I am trying to understand the role of the first part of the AppID for iOS apps. This part was formerly known as the "Bundle Seed ID", but is now often referred to as the AppID Prefix.

A while ago (iOS 5?), Apple made some changes in both their portal and their documentation and started to recommend using the "Team ID" (unique per developer account) as the AppID Prefix. This is simple and straightforward for new developers with new apps.

But what is the the best practice for handling existing apps with regards to the AppID prefix? I know that it is not possible to change BundleID (= the second part of the AppID) between two app versions, but is it safe to change the prefix between app versions?

Note that I am not referring to replacing a "wildcard AppID", e.g. ABC1234567.*, to an explicit AppID using the same prefix, e.g. ABC1234567.com.mycompany.myapp. There is tons of information about this (most of it outdated, though). I am thinking about changing the complete AppID, e.g. ABC1234567.com.mycompany.myapp, for an existing app by replacing the prefix with my Team ID, e.g. DEF7654321.com.mycompany.myapp.

I think I have read somewhere that it should be OK to change the prefix for existing apps, except in the special case that the app is using the keychain to store data. If this is true, the easiest way to handle the prefix for existing apps would be to migrate to the new Team ID when it's time to release next update. When all my apps are migrated, I can continue using the Team ID (as Apple recommends for new apps) and finally forget about all this mess. Can anyone confirm this?

If you can shed some more lights upon the concept of the AppID prefix, and what it is actually used for on an iOS device (except the keychain which I already know about), I would be happy if you could write a comment. Perhaps we could build up the full understanding of this by adding bits and pieces from different sources. Sadly, the Apple documentation is very thin in this area.

(There is another similar question: Can I change the Bundle Identifier in my app after it's been approved? But that is mainly focusing on the BundleID, i.e. the second part of the AppID, so this is not a duplicate, even though some of the answers and comments are touching upon this topic.)

Community
  • 1
  • 1
Magnus
  • 857
  • 1
  • 10
  • 27
  • Concerning the question whether the AppID prefix is used for any other purposes than to control the access to the keychain, I have noticed a change in the UIPasteboard reference doc. for iOS 7: For the method "pasteboardWithName:create:" there is now a note stating that two apps must have "the same team ID" to be able to share a pasteboard. I suspect that this might be a typo, and that it is actually referring to the AppID prefix. It is hard to believe that the iOS, in runtime, has got any direct knowledge of the TeamID, except the case when the TeamID is used as the AppID prefix. – Magnus Oct 16 '13 at 10:05

2 Answers2

26

My conclusion, as of today, is that it is completely safe to replace the AppID prefix by a new one, with the exception of apps using the keychain. This opens up for migrating the prefix for all my exiting apps on the App Store to the new TeamID based prefix.

This conclusion is based on the following input:

  • A discussion I had with Apple's developer support a couple of weeks ago. They told me that there should not be any problems changing the prefix, except for apps using the keychain.
  • A test I did, using ad-hoc distribution, verifying that an existing app on a test device did not lose any data when it was updated to a new version with another prefix.
  • The fact that I have successfully uploaded new versions, with replaced prefix, of two of my existing apps without any problems so far.

The status of the two "live" apps that I have changed, is that they have been approved in the review. However, they are currently waiting in "Pending Developer Release", since I am waiting for a third app to get ready in order to sync the release with that one.

If I see any kind of problems when they go live on the App Store, I will of course update this answer.

Update:

The two apps were released successfully more than three weeks ago. The roll-out worked as expected and I have not received any user complaints.

In summary, the answer is YES, this is completely safe!

Magnus
  • 857
  • 1
  • 10
  • 27
  • Could you please explain how you managed to create new App IDs with different prefixes? It still doesn't let me do this. Says `An App ID with Identifier 'com.domain.appname' is not available. Please enter a different string.` - both for App IDs that I still have active and for the one I deleted while it was possible to delete them. – Filip Radelic Oct 21 '13 at 21:51
  • The option to create new random prefixes has been removed. If you start from scratch today, your only option is to use the TeamID as the prefix. If you have some existing apps using other prefixes, these existing prefixes will also appear as options when creating new AppIDs. In my case, I have only tested to replace an old wildcard AppID with a new explicit one using the TeamID. I think your problem might be another: BundleIDs need to be globally unique. See http://stackoverflow.com/a/6546206/824515 Perhaps it's not possible to replace an old explicit AppID with a new one based on the TeamID? – Magnus Oct 22 '13 at 06:37
  • One more thing: I have 5 apps on the App Store. None is using any features requiring explicit AppIDs. I had only one single wildcard AppID serving all apps. However, when I started to investigate this issue, I found that there were a number of existing explicit AppIDs on the portal that I have never created myself! There were exactly one ID for each of my existing apps. These were using the TeamID, even though my apps were using another prefix! Probably, these IDs were auto-generated when Apple introduced the new TeamID policy. It was one of these IDs that I used when replacing the prefix. – Magnus Oct 22 '13 at 07:01
  • Yeah, it's a completely different story with wildcards (you should have mentioned that in your question), but wildcards are not used by everyone and *can't* be used by many apps. As for having each of your app IDs explicitly in the portal, Xcode 5 does that for every project you build with your team credentials. – Filip Radelic Oct 22 '13 at 08:16
  • Yes, I know. The reason I started to dig into this area is that I'm planning to add IAP to one of my apps, so I needed to change to an explicit AppID for that one. Then I wanted to use the new TeamID prefix, since that's clearly what Apple recommends nowadays. The main focus of my question was whether it's safe to replace the prefix, not how to actually perform the replacement in different situations. That's the reason I didn't mention the wildcard ID in the first place. Concerning the safety, I regard my question as answered. Thanks for explaining where my new AppIDs on the portal came from! – Magnus Oct 22 '13 at 08:58
  • @Magnus : I have some similar case. I have transferred one app into my account and App ID's prefix got changed. Now old app was using keychain data and in new version I don't care about those keychain data, also not using keychain system. So currently due to prefix changes, I am not able to install new version on old Live version during testing phase. Can you give me suggestion what should I do ? – Maulik May 27 '15 at 06:50
  • @Maulik: Sorry, I have no idea. I think you need to contact Apple's developer support. – Magnus May 27 '15 at 08:49
  • @Magnus: Ok. Also any idea if I ignore the warning and upload build to Apple store will it be installed after approve ? – Maulik May 27 '15 at 10:03
  • Hi, do you remember if you're still able to send push notifications to the devices that updated to the new app (new prefix identifier)? Without the users opening the app and therefore refreshing the token, I'm wondering if old tokens (based on the old prefix identifier) work with the new app update (new prefix). – UnsafePointer Jul 04 '16 at 11:36
  • @Ruenzuo: I haven't tried. I would guess it won't work. – Magnus Jul 05 '16 at 08:14
  • @Magnus thank you very much for the information shared. – UnsafePointer Jul 05 '16 at 08:39
  • That was really helpful for me. Thanks Note: Ad-hoc build was not successfully updated on existing build, but testFlight did. so we can confirm the process by using testFlight as well – ZaEeM ZaFaR Dec 05 '16 at 09:55
  • anyone found a way to upgrade app after changing team id. I want to test keychain loss, and log-out user smoothly. – Durgaprasad Jan 02 '17 at 07:48
10

Apple published a new tech note on February 12th 2014 confirming that it's possible (and safe*) to change Prefixes yourself for Wildcard App IDs, but it's still impossible to do it yourself for Explicit App IDs.

However, they say you can contact member center maintainers if you would like them to change your Prefixes for Explicit App IDs.

Gonna include this part here in case they change their mind again:

All other App IDs will require the assistance of the member center maintainers - if you are not using a wildcard App ID, then you should contact the iOS member center maintainers for assistance. Here are the steps you can use to do that:

  1. Go to https://developer.apple.com/contact/.
  2. Submit a request by clicking the link under Enrollment and Account.

* Keep in mind that if your app stores data in Keychain, changing app ID prefix will result in one-time Keychain data loss.

Filip Radelic
  • 26,607
  • 8
  • 71
  • 97