Skip to content

Commit

Permalink
return to ios.registerRemoteNotifications name (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielEliraz authored Jun 7, 2021
1 parent bc49a94 commit f69c985
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class NotificationsExampleApp extends Component {
}

requestPermissionsIos(options) {
Notifications.ios.requestPermissions(options);
Notifications.ios.registerRemoteNotifications(options);
}

requestPermissions() {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/Notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class NotificationsRoot {
* registerRemoteNotifications
*/
public registerRemoteNotifications(options?: RequestPermissionsOptions[]) {
this.ios.requestPermissions(options);
this.ios.registerRemoteNotifications(options);
this.android.registerRemoteNotifications();
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/NotificationsIOS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class NotificationsIOS {
/**
* Request permissions to send remote notifications
*/
public requestPermissions(options?: RequestPermissionsOptions[]) {
public registerRemoteNotifications(options?: RequestPermissionsOptions[]) {
return this.commands.requestPermissions(options);
}

Expand Down
4 changes: 2 additions & 2 deletions website/docs/api/ios-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ title: iOS Specific Commands
sidebar_label: iOS specific
---

## requestPermissions(options?: string[])
## registerRemoteNotifications(options?: string[])
Requests notification permissions from iOS, prompting the user's dialog box.

```js
Notifications.ios.requestPermissions(['ProvidesAppNotificationSettings']);
Notifications.ios.registerRemoteNotifications(['ProvidesAppNotificationSettings']);
```

## checkPermissions()
Expand Down

0 comments on commit f69c985

Please sign in to comment.