Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/manual-linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ node_modules/@react-native-community/push-notification-ios/ios/PushNotificationI
libRNCPushNotificationIOS.a
```

More info on manual linking, [here](https://facebook.github.io/react-native/docs/linking-libraries-ios).
More info on manual linking, [here](https://reactnative.dev/docs/linking-libraries-ios).
8 changes: 4 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export type PushNotificationEventName =

/**
* Handle push notifications for your app, including permission handling and icon badge number.
* @see https://facebook.github.io/react-native/docs/pushnotificationios.html#content
* @see https://reactnative.dev/docs/pushnotificationios.html#content
*
* //FIXME: BGR: The documentation seems completely off compared to the actual js implementation. I could never get the example to run
*/
Expand Down Expand Up @@ -196,14 +196,14 @@ export interface PushNotificationIOSStatic {
/**
* Remove all delivered notifications from Notification Center.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#removealldeliverednotifications
* See https://reactnative.dev/docs/pushnotificationios.html#removealldeliverednotifications
*/
removeAllDeliveredNotifications(): void;

/**
* Provides you with a list of the app’s notifications that are still displayed in Notification Center.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getdeliverednotifications
* See https://reactnative.dev/docs/pushnotificationios.html#getdeliverednotifications
*/
getDeliveredNotifications(
callback: (notifications: Record<string, any>[]) => void,
Expand All @@ -212,7 +212,7 @@ export interface PushNotificationIOSStatic {
/**
* Removes the specified notifications from Notification Center
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#removedeliverednotifications
* See https://reactnative.dev/docs/pushnotificationios.html#removedeliverednotifications
*/
removeDeliveredNotifications(identifiers: string[]): void;

Expand Down
50 changes: 25 additions & 25 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export type PushNotificationEventName = $Keys<{
* Handle push notifications for your app, including permission handling and
* icon badge number.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html
* See https://reactnative.dev/docs/pushnotificationios.html
*/
class PushNotificationIOS {
_data: Object;
Expand All @@ -87,7 +87,7 @@ class PushNotificationIOS {
/**
* Schedules the localNotification for immediate presentation.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#presentlocalnotification
* See https://reactnative.dev/docs/pushnotificationios.html#presentlocalnotification
*/
static presentLocalNotification(details: Object) {
RNCPushNotificationIOS.presentLocalNotification(details);
Expand All @@ -96,7 +96,7 @@ class PushNotificationIOS {
/**
* Schedules the localNotification for future presentation.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#schedulelocalnotification
* See https://reactnative.dev/docs/pushnotificationios.html#schedulelocalnotification
*/
static scheduleLocalNotification(details: Object) {
RNCPushNotificationIOS.scheduleLocalNotification(details);
Expand All @@ -105,7 +105,7 @@ class PushNotificationIOS {
/**
* Cancels all scheduled localNotifications.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#cancelalllocalnotifications
* See https://reactnative.dev/docs/pushnotificationios.html#cancelalllocalnotifications
*/
static cancelAllLocalNotifications() {
RNCPushNotificationIOS.cancelAllLocalNotifications();
Expand All @@ -114,7 +114,7 @@ class PushNotificationIOS {
/**
* Remove all delivered notifications from Notification Center.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#removealldeliverednotifications
* See https://reactnative.dev/docs/pushnotificationios.html#removealldeliverednotifications
*/
static removeAllDeliveredNotifications(): void {
RNCPushNotificationIOS.removeAllDeliveredNotifications();
Expand All @@ -123,7 +123,7 @@ class PushNotificationIOS {
/**
* Provides you with a list of the app’s notifications that are still displayed in Notification Center.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getdeliverednotifications
* See https://reactnative.dev/docs/pushnotificationios.html#getdeliverednotifications
*/
static getDeliveredNotifications(
callback: (notifications: Array<Object>) => void,
Expand All @@ -134,7 +134,7 @@ class PushNotificationIOS {
/**
* Removes the specified notifications from Notification Center
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#removedeliverednotifications
* See https://reactnative.dev/docs/pushnotificationios.html#removedeliverednotifications
*/
static removeDeliveredNotifications(identifiers: Array<string>): void {
RNCPushNotificationIOS.removeDeliveredNotifications(identifiers);
Expand All @@ -143,7 +143,7 @@ class PushNotificationIOS {
/**
* Sets the badge number for the app icon on the home screen.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#setapplicationiconbadgenumber
* See https://reactnative.dev/docs/pushnotificationios.html#setapplicationiconbadgenumber
*/
static setApplicationIconBadgeNumber(number: number) {
RNCPushNotificationIOS.setApplicationIconBadgeNumber(number);
Expand All @@ -152,7 +152,7 @@ class PushNotificationIOS {
/**
* Gets the current badge number for the app icon on the home screen.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getapplicationiconbadgenumber
* See https://reactnative.dev/docs/pushnotificationios.html#getapplicationiconbadgenumber
*/
static getApplicationIconBadgeNumber(callback: Function) {
RNCPushNotificationIOS.getApplicationIconBadgeNumber(callback);
Expand All @@ -161,7 +161,7 @@ class PushNotificationIOS {
/**
* Cancel local notifications.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#cancellocalnotification
* See https://reactnative.dev/docs/pushnotificationios.html#cancellocalnotification
*/
static cancelLocalNotifications(userInfo: Object) {
RNCPushNotificationIOS.cancelLocalNotifications(userInfo);
Expand All @@ -170,7 +170,7 @@ class PushNotificationIOS {
/**
* Gets the local notifications that are currently scheduled.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getscheduledlocalnotifications
* See https://reactnative.dev/docs/pushnotificationios.html#getscheduledlocalnotifications
*/
static getScheduledLocalNotifications(callback: Function) {
RNCPushNotificationIOS.getScheduledLocalNotifications(callback);
Expand All @@ -180,7 +180,7 @@ class PushNotificationIOS {
* Attaches a listener to remote or local notification events while the app
* is running in the foreground or the background.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#addeventlistener
* See https://reactnative.dev/docs/pushnotificationios.html#addeventlistener
*/
static addEventListener(type: PushNotificationEventName, handler: Function) {
invariant(
Expand Down Expand Up @@ -227,7 +227,7 @@ class PushNotificationIOS {
* Removes the event listener. Do this in `componentWillUnmount` to prevent
* memory leaks.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#removeeventlistener
* See https://reactnative.dev/docs/pushnotificationios.html#removeeventlistener
*/
static removeEventListener(
type: PushNotificationEventName,
Expand All @@ -254,7 +254,7 @@ class PushNotificationIOS {
* a subset of these can be requested by passing a map of requested
* permissions.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#requestpermissions
* See https://reactnative.dev/docs/pushnotificationios.html#requestpermissions
*/
static requestPermissions(permissions?: {
alert?: boolean,
Expand Down Expand Up @@ -285,7 +285,7 @@ class PushNotificationIOS {
/**
* Unregister for all remote notifications received via Apple Push Notification service.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#abandonpermissions
* See https://reactnative.dev/docs/pushnotificationios.html#abandonpermissions
*/
static abandonPermissions() {
RNCPushNotificationIOS.abandonPermissions();
Expand All @@ -295,7 +295,7 @@ class PushNotificationIOS {
* See what push permissions are currently enabled. `callback` will be
* invoked with a `permissions` object.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#checkpermissions
* See https://reactnative.dev/docs/pushnotificationios.html#checkpermissions
*/
static checkPermissions(callback: Function) {
invariant(typeof callback === 'function', 'Must provide a valid callback');
Expand All @@ -306,7 +306,7 @@ class PushNotificationIOS {
* This method returns a promise that resolves to either the notification
* object if the app was launched by a push notification, or `null` otherwise.
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getinitialnotification
* See https://reactnative.dev/docs/pushnotificationios.html#getinitialnotification
*/
static getInitialNotification(): Promise<?PushNotificationIOS> {
return RNCPushNotificationIOS.getInitialNotification().then(
Expand Down Expand Up @@ -360,7 +360,7 @@ class PushNotificationIOS {
* This method is available for remote notifications that have been received via:
* `application:didReceiveRemoteNotification:fetchCompletionHandler:`
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#finish
* See https://reactnative.dev/docs/pushnotificationios.html#finish
*/
finish(fetchResult: string) {
if (
Expand Down Expand Up @@ -389,7 +389,7 @@ class PushNotificationIOS {
/**
* Gets the sound string from the `aps` object
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getsound
* See https://reactnative.dev/docs/pushnotificationios.html#getsound
*/
getSound(): ?string {
return this._sound;
Expand All @@ -398,7 +398,7 @@ class PushNotificationIOS {
/**
* Gets the category string from the `aps` object
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getcategory
* See https://reactnative.dev/docs/pushnotificationios.html#getcategory
*/
getCategory(): ?string {
return this._category;
Expand All @@ -407,7 +407,7 @@ class PushNotificationIOS {
/**
* Gets the notification's main message from the `aps` object
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getalert
* See https://reactnative.dev/docs/pushnotificationios.html#getalert
*/
getAlert(): ?string | ?Object {
return this._alert;
Expand All @@ -416,7 +416,7 @@ class PushNotificationIOS {
/**
* Gets the content-available number from the `aps` object
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getcontentavailable
* See https://reactnative.dev/docs/pushnotificationios.html#getcontentavailable
*/
getContentAvailable(): ContentAvailable {
return this._contentAvailable;
Expand All @@ -425,7 +425,7 @@ class PushNotificationIOS {
/**
* Gets the badge count number from the `aps` object
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getbadgecount
* See https://reactnative.dev/docs/pushnotificationios.html#getbadgecount
*/
getBadgeCount(): ?number {
return this._badgeCount;
Expand All @@ -434,7 +434,7 @@ class PushNotificationIOS {
/**
* Gets the data object on the notif
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getdata
* See https://reactnative.dev/docs/pushnotificationios.html#getdata
*/
getData(): ?Object {
return this._data;
Expand All @@ -443,7 +443,7 @@ class PushNotificationIOS {
/**
* Gets the thread ID on the notif
*
* See https://facebook.github.io/react-native/docs/pushnotificationios.html#getthreadid
* See https://reactnative.dev/docs/pushnotificationios.html#getthreadid
*/
getThreadID(): ?string {
return this._threadID;
Expand Down