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 {
this.android = new NotificationsAndroid(this.commands);
}
/**
* registerRemoteNotifications
*/
public registerRemoteNotifications() {
this.ios.registerRemoteNotifications();
this.android.registerRemoteNotifications();
}
/**
* postLocalNotification
*/
......
......@@ -17,7 +17,7 @@ export class NotificationsAndroid {
/**
* Refresh FCM token
*/
public refreshToken() {
return this.commands.refreshToken();
public registerRemoteNotifications() {
this.commands.refreshToken();
}
}
......@@ -18,7 +18,7 @@ export class NotificationsIOS {
/**
* Request permissions to send remote notifications
*/
public requestPermissions() {
public registerRemoteNotifications() {
return this.commands.requestPermissions();
}
......
......@@ -48,7 +48,7 @@ export class NativeCommandsSender {
}
refreshToken() {
return this.nativeCommandsModule.refreshToken();
this.nativeCommandsModule.refreshToken();
}
registerPushKit() {
......
......@@ -78,6 +78,6 @@ export class Commands {
}
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