Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16259] iOS: Alloy Project has a different IdentifierForVendor than a Titanium Classic project

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2016-09-02T06:47:41.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsalloy, identifierforvendor, ios, provisioning
ReporterShak Hossain
AssigneeEric Merriman
Created2013-07-03T16:05:18.000+0000
Updated2017-03-23T21:35:38.000+0000

Description

I have several iPad Apps distributed via an Enterprise Provisioning Profile. We use the IdentifierForVendor as a means to determine if the iPad has been authenticated to run our apps. We have however, run into a snag with our first Alloy (3.1.0 GA) project. When signed with the same Provisioning Profile for Enterprise distribution, the installed app generates a different IdentifierForVendor. In order to be certain that this is as a result of using an Alloy project, I created a simple hello world Alloy app to install via ad-hoc means to see what it's vendor id would be. The id of the hello world app turned out to be the same as the other Alloy Project App. Has anyone else encountered this issue? And if so, is there anything that can be done to get the ids to be the same for both kinds of projects? Q&A: http://developer.appcelerator.com/question/154425/different-identifierforvendor-with-alloy-project-versus-titanium-project

Comments

  1. Tony Lukasavage 2013-07-08

    Forgive my ignorance, but how do you actually set this IdentifierForVendor value? I know Alloy certainly does nothing specific that would impact this. It may be a simple matter of how the files are processed during compilation, but I need to know a little more about how its used.
  2. Todd Brandys 2013-07-08

    Tony, since Apple is now blocking the use of the UDID, we have started using the IdentifierForVendor call in iOS to get an automagically generated vendor id. It is based on the provisioning profile used to sign the app for distribution. It is not directly set. We authored a Titanium module to provide access to the iOS IdentifierForVendor function. In my case, I have one app developed using the general Titanium environment and another using Alloy. Each app has a different vendor id, which should not be possible. However, if I create a second general Titanium App, the vendor Id matches any other standard app. If I create a second Alloy app, the vendor id matches any other Alloy app. However, the vendor id for all apps should be the same. Below I have included the actual iOS code that can be added to a newly created Module to yield the same module that we have built.
       -(id)deviceId
       {
           return [[[UIDevice currentDevice]identifierForVendor] UUIDString];
       }
       
       -(id)deviceName
       {
           return [[UIDevice currentDevice]name];
       }
       
  3. Chris Barber 2016-09-02

    According to Apple's docs https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/#//apple_ref/occ/instp/UIDevice/identifierForVendor: {quote} If the app was not installed from the app store (such as enterprise apps and apps still in development), then a vendor identifier is calculated based on the app’s bundle ID. The bundle ID is assumed to be in reverse-DNS format. {quote} In other words, that's the way it's suppose to work.
  4. Lee Morris 2017-03-23

    Closing ticket as invalid with reference to the previous comments.

JSON Source