//using System; //using System.Collections; ////#if UNITY_IOS ////using Unity.Notifications.iOS; ////#endif //using UnityEngine; ////TODO: not using Notification Service by now //namespace Notifications.Impls.iOs //{ // public class IOsNotificationsService : INotificationsService // { // private readonly Action _startCoroutine; // public IOsNotificationsService(Action startCoroutine) // { // _startCoroutine = startCoroutine; // } // public void GetToken(Action result) // { // _startCoroutine.Invoke(RequestAuthorization(result)); // } // private IEnumerator RequestAuthorization(Action result) // { // Debug.Log("[IOsNotificationsService] RequestAuthorization"); // #if UNITY_IOS // //using (var req = new AuthorizationRequest(AuthorizationOption.Alert | AuthorizationOption.Badge, true)) // //{ // // while (!req.IsFinished) // // { // // yield return null; // // } // // var res = "\n RequestAuthorization: \n"; // // res += "\n finished: " + req.IsFinished; // // res += "\n granted : " + req.Granted; // // res += "\n error: " + req.Error; // // res += "\n deviceToken: " + req.DeviceToken; // // Debug.Log(res); // // result.Invoke(req.DeviceToken); // //} // #else // yield return null; // #endif // } // } //}