Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10787] iOS: Expose UDID replacements available in iOS6

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2017-11-13T19:13:43.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 7.0.0
ComponentsiOS
Labelsn/a
ReporterMax Stepanov
AssigneeHans Knöchel
Created2012-09-05T15:53:33.000+0000
Updated2017-11-13T23:19:35.000+0000

Description

[[UIDevice currentDevice] identifierForVendor]: * ID that is identical between apps from the same developer * Erased with removal of the last app for that Team ID * Backed up [[UIDevice currentDevice] identifierForAdvertising] * Unique to the device * Available to all applications • Used for advertising * iAd has converted from UDID for iOS 6 and later * Reset with Erase All Content & Settings * Backed up

Comments

  1. Christopher Beloch 2013-04-26

    Can you please implement this as a replacement for Ti.Platform.id ? Just "identifierForVendor" as the Advertising isn't allowed in apps...
  2. Hans Knöchel 2017-04-10

    PR: https://github.com/appcelerator/titanium_mobile/pull/8953
  3. Ygor Lemos 2017-04-10

    @Hans if we are fetching the identifierForAdvertising for iOS, can't we also map the isAdvertisingTrackingEnabled so we can check it before fetching the identifierForAdvertising according to Apple Guidelines in order to avoid rejections? I have mapped it on one of my modules that fetches the advertising Ids. Check it here https://github.com/pinio/tiads/blob/master/ios/Classes/NinjaYgorTiadsModule.m#L81 Also, can we have parity for Android? I'd suggest that for android, we map the AdvertisingIdClient.getAdvertisingIdInfo and Secure.ANDROID_ID for the "vendorIdentifier". Also did it on my module in here: https://github.com/pinio/tiads/blob/master/android/src/ninja/ygor/tiads/TiAdsModule.java It would be awesome if we could access all those Ids directly on from Ti core sdk without modules.
  4. Hans Knöchel 2017-07-20

    [~ygbr] Totally agree! I will add isAdvertisingTrackingEnabled, can you do the Android parity? Otherwise we probably would put the PR on hold until we have the Android resources for this feature (as the Android team has bigger priorities right now).
  5. Hans Knöchel 2017-11-10

    Test-case:
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var btn = Ti.UI.createButton({
           title: 'Trigger'
       });
       
       btn.addEventListener('click', function() {
         Ti.API.info('identifierForVendor');
         Ti.API.info(Ti.Platform.identifierForVendor);
         Ti.API.info(Ti.Platform.getIdentifierForVendor());
       
         Ti.API.info('identifierForAdvertising');
         Ti.API.info(Ti.Platform.identifierForAdvertising);
         Ti.API.info(Ti.Platform.getIdentifierForAdvertising());
       
         Ti.API.info('isAdvertisingTrackingEnabled');
         Ti.API.info(Ti.Platform.isAdvertisingTrackingEnabled);
       });
       
       win.add(btn);
       win.open();
       
  6. Eric Wieber 2017-11-13

    Verified in SDK build 7.0.0.v20171113145138

JSON Source