The case of Apple’s changing identifierForVendor

We had a case where a client reported a bug in our iOS application, affecting all its users, after publishing an update that had unrelated code changes. We traced the problem on the fact that the identifierForVendor value suddently started to returned different value, due to a change unrelated with our release that was undocumented.

According to Apple’s documentation for the identifierForVendor

The value of this property is the same for apps that come from the same vendor running on the same device.

The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them.

Apple’s documentation

However this is not the full story. There are other cases where it changes and it is not obvious but provide some insight to the inner workings of the algorithm that produces the identifierForVendor.

It turns out that the client that faced the problem had changed its legal name and then had requested Apple to change the name used in its developer account. And this caused the identifierForVendor suddenly to return an other value after an new release was published signed with the new Distribution Certificate(referencing the new account name).

We contacted Apple support for this and their response is that this behaviour is not documented but it is resonable of a developer to assume it. Specifically Apple’s support response was

Although the IdentifierForVendor documentation only states that the identifierForVendor value is “determined by data provided by the App Store”, it’s reasonable to assume that the data provided by the App Store includes the vendor name, and that a change to the vendor’s name will result in a different identifierForVendor value when the app is updated.  As the documentation states, removal of all of the apps from a single vendor and subsequently reinstalling one or more apps from that vendor will also result in a new identifierForVendor value:

https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor/

Email correspondance with Apple support


It is obvious from the Apple’s support answer that the documentation does not mention clearly when the identifieForVendor changes, so we are only left with making reasonable assumptions. To avoid making assumptions (reasonable or not) we should have a proper documentation. I should note that as the documentation states we should handle changes in the identifieForVendor gracefully.

Perhaps someone should fork Apple’s documentation and accept PRs to improve it with rich examples and missing undocumented behaviour.