Title here
Summary here
This API have to be called when the application start.
To do so, you have to modify the method beforeInitialize
of your application to call the tracking API.
import $TrackingService from "@TrackingService";
export default $Application.declare("app", {
properties: /** @lends app.prototype */ {
name: "app",
trackingService: {
class: $TrackingService
}
},
methods: {
beforeInitialize: function () {
const promise = $Application.prototype.beforeInitialize.apply(this, arguments);
return this.trackingService.requestTrackingAuthorization().then(promise);
}
}
});
This way, the application tracking privacy flow will be called when the application starts.
Note
To get the value set by the user, use getTrackingAuthorizationStatus
method.
Note
This service is specific for Apple application and is only implemented on TVOS.
As it has to be called in the application, default implementation returns a resolved promise to be cross device compatible.