So the variation in the provisioning device mechanism indicates that you’re installing these apps via two different channels:
-
The presence of ProvisionedDevices indicates a Development or Ad Hoc signed build, which is limited to a specific set of devices.
-
OTOH, ProvisionsAllDevices indicates an In-House (Enterprise) signed build.
For all the gory details here, see TN3125 Inside Code Signing: Provisioning Profiles.
In theory that shouldn’t affect identifierForVendor but, as I mentioned above, there’s a bunch of hidden state here.
What I’m trying to tease apart here is whether the problem you’re seeing is caused by:
Based on your original post I assumed that app1 and app2 were both In-House (Enterprise) signed, but that leaves the possibility of a generational change. My goal is to get both apps on the same generation. However, in trying to do that you varied the distribution channel, which is another factor that might confuse things. So I’d like to avoid dealing with that and instead focus on the original two factors.
My suggestion is that you sign both app1 and app2 the same way and see if you still have problems with identifierForVendor.
Now, I tried this here in my office and I saw the results I expected. I created two apps that only differ by the last component in their bundle ID and installed them on my device:
-
If both apps are Development signed, the identifiers are the same.
-
If both apps are Ad Hoc signed, the identifiers are the same.
-
If I mix Development and Ad Hoc, the identifiers are the same.
Sadly, I don’t have an easy path to test In-House (Enterprise) case )-:
This is Xcode 16.3 targeting iOS 18.5.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Various code signing factors have changed over the years, and it’s easy to imagine how those changes might interact with identifierForVendor generation.