Packagecom.distriqt.extension.idfa
Classpublic final class IDFA
InheritanceIDFA Inheritance flash.events.EventDispatcher

This class represents the IDFA extension. A simple extension to retrieve the advertising identifier for the current device



Public Properties
 PropertyDefined By
  advertisingTrackingEnabled : Boolean
Deprecated: Use the isLimitAdTrackingEnabled property on the IDFAEvent
[read-only] A Boolean value that indicates whether the user has limited ad tracking.
IDFA
  implementation : String
[read-only] The implementation currently in use.
IDFA
  isSupported : Boolean
[static] [read-only] Whether the current device supports the extensions functionality
IDFA
  nativeVersion : String
[read-only] The native version string of the native extension.
IDFA
  service : IDFA
[static] [read-only] The singleton instance of the IDFA class.
IDFA
  version : String
[read-only] The version of this extension.
IDFA
Public Methods
 MethodDefined By
  
Constructor You should not call this directly, but instead use the singleton access
IDFA
  
Returns the current authorisation status of the device.
IDFA
  
dispose():void
Disposes the extension and releases any allocated resources.
IDFA
  
getIDFA(callback:Function = null):void
An alphanumeric string unique to each device, used only for serving advertisements.
IDFA
  
init(key:String):void
Deprecated: You no longer need to use an application key
[static] Initialises the extension class for use with the provided key.
IDFA
  
requestAuthorisation(callback:Function = null):Boolean
This function triggers the authorisation request dialog.
IDFA
Events
 Event Summary Defined By
   IDFA
   IDFA
   IDFA
Public Constants
 ConstantDefined By
  EXT_CONTEXT_ID : String = com.distriqt.IDFA
[static]
IDFA
  VERSION : String = 5.2.0
[static]
IDFA
Property Detail
advertisingTrackingEnabledproperty
advertisingTrackingEnabled:Boolean  [read-only]
Deprecated: Use the isLimitAdTrackingEnabled property on the IDFAEvent

A Boolean value that indicates whether the user has limited ad tracking.

Check the value of this property before performing any advertising tracking. If the value is NO, use the advertising identifier only for the following purposes: frequency capping, attribution, conversion events, estimating the number of unique users, advertising fraud detection, and debugging.

NOTE: This value will be invalid immediately after initialisation. To ensure you have the should call getIDFA and use the isLimitAdTrackingEnabled property on the IDFAEvent.COMPLETE event.


Implementation
    public function get advertisingTrackingEnabled():Boolean
implementationproperty 
implementation:String  [read-only]

The implementation currently in use. This should be one of the following depending on the platform in use and the functionality supported by this extension:


Implementation
    public function get implementation():String
isSupportedproperty 
isSupported:Boolean  [read-only]

Whether the current device supports the extensions functionality


Implementation
    public static function get isSupported():Boolean
nativeVersionproperty 
nativeVersion:String  [read-only]

The native version string of the native extension.


Implementation
    public function get nativeVersion():String
serviceproperty 
service:IDFA  [read-only]

The singleton instance of the IDFA class.


Implementation
    public static function get service():IDFA

Throws
Error — If there was a problem creating or accessing the extension, or if the key is invalid
versionproperty 
version:String  [read-only]

The version of this extension.

This should be of the format, MAJOR.MINOR.BUILD


Implementation
    public function get version():String
Constructor Detail
IDFA()Constructor
public function IDFA()

Constructor You should not call this directly, but instead use the singleton access

Method Detail
authorisationStatus()method
public function authorisationStatus():String

Returns the current authorisation status of the device. This status indicates whether the user has authorised or denied access to notifications. The NOT_DETERMINED status is returned when your application is first installed and you have not yet requested authorisation.

Returns
String — A value from the TrackingAuthorisationStatus constants

See also

dispose()method 
public function dispose():void

Disposes the extension and releases any allocated resources. Once this function has been called, a call to init is neccesary again before any of the extensions functionality will work.

getIDFA()method 
public function getIDFA(callback:Function = null):void

An alphanumeric string unique to each device, used only for serving advertisements.

This identifier may change—for example, if the user erases the device—so you should not cache it.

Important In iOS 10.0 and later, the value of this is all zeroes when the user has limited ad tracking (00000000-0000-0000-0000-000000000000).

Parameters

callback:Function (default = null) — A single alternative callback function called on completion of the advertising id retrieval. This callback must have the signature: function (info:AdvertisingIdInfo):void

See also

com.distriqt.extension.idfa.events.IDFAEvent.COMPLETE
com.distriqt.extension.idfa.AdvertisingIdInfo
init()method 
public static function init(key:String):void
Deprecated: You no longer need to use an application key

Initialises the extension class for use with the provided key.

Parameters

key:String


Throws
Error — If there was a problem creating or accessing the extension, or if the key is invalid
requestAuthorisation()method 
public function requestAuthorisation(callback:Function = null):Boolean

This function triggers the authorisation request dialog. This dialog will only be displayed once to a user on iOS so make sure you have adequately informed your user why you are requesting authorisation.

Parameters

callback:Function (default = null)

Returns
Booleantrue if the request was started successfully and false otherwise
Event Detail
idfa:authorisation:changed Event
Event Object Type: com.distriqt.extension.idfa.events.IDFAAuthorisationEvent
IDFAAuthorisationEvent.type property = com.distriqt.extension.idfa.events.IDFAAuthorisationEvent.CHANGED

idfa:complete Event  
Event Object Type: com.distriqt.extension.idfa.events.IDFAEvent
IDFAEvent.type property = com.distriqt.extension.idfa.events.IDFAEvent.COMPLETE

idfa:error Event  
Event Object Type: com.distriqt.extension.idfa.events.IDFAEvent
IDFAEvent.type property = com.distriqt.extension.idfa.events.IDFAEvent.ERROR

Constant Detail
EXT_CONTEXT_IDConstant
public static const EXT_CONTEXT_ID:String = com.distriqt.IDFA

VERSIONConstant 
public static const VERSION:String = 5.2.0