Package | com.distriqt.extension.idfa |
Class | public final class IDFA |
Inheritance | IDFA flash.events.EventDispatcher |
This class represents the IDFA extension. A simple extension to retrieve the advertising identifier for the current device
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
IDFA()
Constructor
You should not call this directly, but instead use the singleton access
| IDFA | ||
authorisationStatus():String
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 |
Event | Summary | Defined By | ||
---|---|---|---|---|
IDFA | ||||
IDFA | ||||
IDFA |
Constant | Defined By | ||
---|---|---|---|
EXT_CONTEXT_ID : String = com.distriqt.IDFA [static] | IDFA | ||
VERSION : String = 5.2.0 [static] | IDFA |
advertisingTrackingEnabled | property |
advertisingTrackingEnabled:Boolean
[read-only]
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.
public function get advertisingTrackingEnabled():Boolean
implementation | property |
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:
Android
iOS
default
unknown
public function get implementation():String
isSupported | property |
isSupported:Boolean
[read-only] Whether the current device supports the extensions functionality
public static function get isSupported():Boolean
nativeVersion | property |
nativeVersion:String
[read-only]
The native version string of the native extension.
public function get nativeVersion():String
service | property |
service:IDFA
[read-only] The singleton instance of the IDFA class.
public static function get service():IDFA
Error — If there was a problem creating or accessing the extension, or if the key is invalid
|
version | property |
version:String
[read-only]
The version of this extension.
This should be of the format, MAJOR.MINOR.BUILD
public function get version():String
IDFA | () | Constructor |
public function IDFA()
Constructor You should not call this directly, but instead use the singleton access
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.
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
init | () | method |
public static function init(key:String):void
Initialises the extension class for use with the provided key.
Parameters
key:String |
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 )
|
Boolean — true if the request was started successfully and false otherwise
|
idfa:authorisation:changed | Event |
com.distriqt.extension.idfa.events.IDFAAuthorisationEvent
com.distriqt.extension.idfa.events.IDFAAuthorisationEvent.CHANGED
idfa:complete | Event |
com.distriqt.extension.idfa.events.IDFAEvent
com.distriqt.extension.idfa.events.IDFAEvent.COMPLETE
idfa:error | Event |
com.distriqt.extension.idfa.events.IDFAEvent
com.distriqt.extension.idfa.events.IDFAEvent.ERROR
EXT_CONTEXT_ID | Constant |
public static const EXT_CONTEXT_ID:String = com.distriqt.IDFA
VERSION | Constant |
public static const VERSION:String = 5.2.0