Commit b37ed53f authored by yogevbd's avatar yogevbd

Add identical registerRemoteNotifications api for iOS and Android

parent 55035864
...@@ -35,6 +35,14 @@ export class NotificationsRoot { ...@@ -35,6 +35,14 @@ export class NotificationsRoot {
this.android = new NotificationsAndroid(this.commands); this.android = new NotificationsAndroid(this.commands);
} }
/**
* registerRemoteNotifications
*/
public registerRemoteNotifications() {
this.ios.registerRemoteNotifications();
this.android.registerRemoteNotifications();
}
/** /**
* postLocalNotification * postLocalNotification
*/ */
......
...@@ -17,7 +17,7 @@ export class NotificationsAndroid { ...@@ -17,7 +17,7 @@ export class NotificationsAndroid {
/** /**
* Refresh FCM token * Refresh FCM token
*/ */
public refreshToken() { public registerRemoteNotifications() {
return this.commands.refreshToken(); this.commands.refreshToken();
} }
} }
...@@ -18,7 +18,7 @@ export class NotificationsIOS { ...@@ -18,7 +18,7 @@ export class NotificationsIOS {
/** /**
* Request permissions to send remote notifications * Request permissions to send remote notifications
*/ */
public requestPermissions() { public registerRemoteNotifications() {
return this.commands.requestPermissions(); return this.commands.requestPermissions();
} }
......
...@@ -48,7 +48,7 @@ export class NativeCommandsSender { ...@@ -48,7 +48,7 @@ export class NativeCommandsSender {
} }
refreshToken() { refreshToken() {
return this.nativeCommandsModule.refreshToken(); this.nativeCommandsModule.refreshToken();
} }
registerPushKit() { registerPushKit() {
......
...@@ -78,6 +78,6 @@ export class Commands { ...@@ -78,6 +78,6 @@ export class Commands {
} }
public refreshToken() { public refreshToken() {
return this.nativeCommandsSender.refreshToken(); this.nativeCommandsSender.refreshToken();
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment