diff --git a/lib/src/Notifications.ts b/lib/src/Notifications.ts index 1669402725ebbeb3b8be0789a1d857158aa55a0c..58e9f85efe10525f204ecc8f613a78c17cc3e93a 100644 --- a/lib/src/Notifications.ts +++ b/lib/src/Notifications.ts @@ -35,6 +35,14 @@ export class NotificationsRoot { this.android = new NotificationsAndroid(this.commands); } + /** + * registerRemoteNotifications + */ + public registerRemoteNotifications() { + this.ios.registerRemoteNotifications(); + this.android.registerRemoteNotifications(); + } + /** * postLocalNotification */ diff --git a/lib/src/NotificationsAndroid.ts b/lib/src/NotificationsAndroid.ts index 8688512684815fd768fc43d72c980e87da6be9ce..33686e28abe74ab8fa8fbcfa8f71a88044c96959 100644 --- a/lib/src/NotificationsAndroid.ts +++ b/lib/src/NotificationsAndroid.ts @@ -17,7 +17,7 @@ export class NotificationsAndroid { /** * Refresh FCM token */ - public refreshToken() { - return this.commands.refreshToken(); + public registerRemoteNotifications() { + this.commands.refreshToken(); } } diff --git a/lib/src/NotificationsIOS.ts b/lib/src/NotificationsIOS.ts index cb4a08b3f189ea2163bb2bc721983c7689f771b1..73f1e1d60318da7680936d4d1620b9d87173050c 100644 --- a/lib/src/NotificationsIOS.ts +++ b/lib/src/NotificationsIOS.ts @@ -18,7 +18,7 @@ export class NotificationsIOS { /** * Request permissions to send remote notifications */ - public requestPermissions() { + public registerRemoteNotifications() { return this.commands.requestPermissions(); } diff --git a/lib/src/adapters/NativeCommandsSender.ts b/lib/src/adapters/NativeCommandsSender.ts index 67b7c263857d1c24ac205e0d36a90441a26a6f35..12d2c6f3bceea569d6cf608ec891b2909660c1f3 100644 --- a/lib/src/adapters/NativeCommandsSender.ts +++ b/lib/src/adapters/NativeCommandsSender.ts @@ -48,7 +48,7 @@ export class NativeCommandsSender { } refreshToken() { - return this.nativeCommandsModule.refreshToken(); + this.nativeCommandsModule.refreshToken(); } registerPushKit() { diff --git a/lib/src/commands/Commands.ts b/lib/src/commands/Commands.ts index eed7b7557f84263e473aaae62156b4e41f026b96..9e5ea0ec8fcea7846cab050780242dd99e0d422d 100644 --- a/lib/src/commands/Commands.ts +++ b/lib/src/commands/Commands.ts @@ -78,6 +78,6 @@ export class Commands { } public refreshToken() { - return this.nativeCommandsSender.refreshToken(); + this.nativeCommandsSender.refreshToken(); } }