Пример #1
0
        /// <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
        }
Пример #2
0
 private static void RequestAuthorizationCallbackReceived()
 {
     _requestAuthorizationCallback?.Invoke(GetAuthorizationStatus());
     _requestAuthorizationCallback = null;
 }