/// <summary> /// For iOS 14 and above: Request the authorization of the user to access the IDFA, when the AuthorizationStatus is to NotDetermined, /// by triggering the Apple one time popup /// /// For iOS 13 and below: Do nothing /// </summary> /// <param name="callback">Fired when the user chooses one of Apple popup options: authorize or deny.</param> internal static void RequestAuthorization(RequestAuthorizationCallback callback) { #if !UNITY_EDITOR _requestAuthorizationCallback += callback; RequestNativeAuthorization(RequestAuthorizationCallbackReceived); #endif }
private static void RequestAuthorizationCallbackReceived() { _requestAuthorizationCallback?.Invoke(GetAuthorizationStatus()); _requestAuthorizationCallback = null; }