1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-01 08:03:37 +00:00

Cleared Console.WriteLine for iOS push notifications issue (#1739)

This commit is contained in:
Federico Maccaroni
2022-01-31 11:12:24 -03:00
committed by GitHub
parent c0c893fd59
commit d0ffb108b1
4 changed files with 23 additions and 33 deletions

View File

@@ -251,36 +251,30 @@ namespace Bit.iOS
return base.ContinueUserActivity(application, userActivity, completionHandler);
}
const string TAG = "##PUSH NOTIFICATIONS";
public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
{
Console.WriteLine($"{TAG} FailedToRegisterForRemoteNotifications");
_pushHandler?.OnErrorReceived(error);
}
public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
{
Console.WriteLine($"{TAG} RegisteredForRemoteNotifications");
_pushHandler?.OnRegisteredSuccess(deviceToken);
}
public override void DidRegisterUserNotificationSettings(UIApplication application,
UIUserNotificationSettings notificationSettings)
{
Console.WriteLine($"{TAG} DidRegisterUserNotificationSettings");
application.RegisterForRemoteNotifications();
}
public override void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo,
Action<UIBackgroundFetchResult> completionHandler)
{
Console.WriteLine($"{TAG} DidReceiveRemoteNotification");
_pushHandler?.OnMessageReceived(userInfo);
}
public override void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)
{
Console.WriteLine($"{TAG} ReceivedRemoteNotification");
_pushHandler?.OnMessageReceived(userInfo);
}
@@ -321,8 +315,6 @@ namespace Bit.iOS
private void RegisterPush()
{
Console.WriteLine($"{TAG} RegisterPush");
var notificationListenerService = new PushNotificationListenerService();
ServiceContainer.Register<IPushNotificationListenerService>(
"pushNotificationListenerService", notificationListenerService);