public override void LogoutEmail(OnSetEmailSuccess success, OnSetEmailFailure failure)
 {
    iOS.OneSignal.LogoutEmail(() => success?.Invoke(), error =>
        {
           if (failure != null)
           {
              Dictionary<string, object> dict;
              if (error.UserInfo != null)
                 dict = NSDictToPureDict(error.UserInfo);
              else
                 dict = new Dictionary<string, object> { { "error", "An unknown error occurred" } };
              failure(dict);
           }
        });
 }
 public override void SetEmail(string email, string emailAuthCode, OnSetEmailSuccess success, OnSetEmailFailure failure)
 {
     iOS.OneSignal.SetEmail(email, emailAuthCode, () => success?.Invoke(), error =>
     {
         if (failure != null)
         {
             Dictionary <string, object> dict;
             if (error.UserInfo != null)
             {
                 dict = NSDictToPureDict(error.UserInfo);
             }
             else
             {
                 dict = new Dictionary <string, object> {
                     { "error", "An unknown error occurred" }
                 }
             };
             failure(dict);
         }
     });
 }
Exemplo n.º 3
0
 public void OnSuccess()
 {
     _success?.Invoke();
 }