Skip to content

Commit aac425b

Browse files
NaturalclarMateusAndradelukebars
authored
add changes for next version (#133)
Co-authored-by: Mateus Andrade <[email protected]> Co-authored-by: Lukas Baranauskas <[email protected]>
1 parent 0dd51f1 commit aac425b

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ There are a couple of cases for linking. Choose the appropriate one.
2424
The package is [automatically linked](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) when building the app. All you need to do is:
2525

2626
```bash
27-
cd ios && pod install
27+
npx pod-install
2828
```
2929

3030
- `react-native <= 0.59`
@@ -75,6 +75,7 @@ Then, add the 'UNUserNotificationCenterDelegate' to protocols:
7575
At the top of the file:
7676
7777
```objective-c
78+
#import <UserNotifications/UserNotifications.h>
7879
#import <RNCPushNotificationIOS.h>
7980
```
8081

@@ -118,12 +119,6 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
118119

119120
```
120121

121-
Also, if not already present, at the top of the file:
122-
123-
```objective-c
124-
#import <UserNotifications/UserNotifications.h>
125-
```
126-
127122
And then in your AppDelegate implementation, add the following:
128123

129124
```objective-c

example/App.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ export const App = () => {
8686
const sendLocalNotification = () => {
8787
PushNotificationIOS.presentLocalNotification({
8888
alertBody: 'Sample local notification',
89-
fireDate: new Date().toISOString(),
9089
applicationIconBadgeNumber: 1,
9190
});
9291
};

ios/RNCPushNotificationIOS.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,11 @@ @implementation RNCPushNotificationIOS
9292
formattedLocalNotification[@"fireDate"] = fireDateString;
9393
}
9494
formattedLocalNotification[@"alertAction"] = RCTNullIfNil(notification.alertAction);
95+
formattedLocalNotification[@"alertTitle"] = RCTNullIfNil(notification.alertTitle);
9596
formattedLocalNotification[@"alertBody"] = RCTNullIfNil(notification.alertBody);
9697
formattedLocalNotification[@"applicationIconBadgeNumber"] = @(notification.applicationIconBadgeNumber);
9798
formattedLocalNotification[@"category"] = RCTNullIfNil(notification.category);
99+
formattedLocalNotification[@"repeatInterval"] = RCTNullIfNil(notification.repeatInterval);
98100
formattedLocalNotification[@"soundName"] = RCTNullIfNil(notification.soundName);
99101
formattedLocalNotification[@"userInfo"] = RCTNullIfNil(RCTJSONClean(notification.userInfo));
100102
formattedLocalNotification[@"remote"] = @NO;

0 commit comments

Comments
 (0)