File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,33 @@ react-native link @react-native-community/push-notification-ios
45
45
46
46
If you don't want to use the methods above, you can always [ link the library manually] ( ./docs/manual-linking.md ) .
47
47
48
- ### Update ` AppDelegate.m `
48
+ ### Add Capabilities : Background Mode - Remote Notifications
49
+
50
+ Go into your MyReactProject/ios dir and open MyProject.xcworkspace workspace.
51
+ Select the top project "MyProject" ans select the "Signing & Capabilities" tab.
52
+ Add a 2 new Capabilities using "+" button:
53
+ - ` Background Mode ` capability and tick ` Remote Notifications ` .
54
+ - ` Push Notifications ` capability
55
+
56
+
57
+ ### Augment ` AppDelegate `
49
58
50
59
Finally, to enable support for ` notification ` and ` register ` events you need to augment your AppDelegate.
51
60
61
+ ### Update ` AppDelegate.h `
62
+
63
+ At the top of the file:
64
+ ``` objective-c
65
+ #import < UserNotifications/UNUserNotificationCenter.h>
66
+ ```
67
+
68
+ Then, add the 'UNUserNotificationCenterDelegate' to protocols:
69
+
70
+ ``` objective-c
71
+ @interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate, UNUserNotificationCenterDelegate >
72
+ ```
73
+ ### Update `AppDelegate.m`
74
+
52
75
At the top of the file:
53
76
54
77
```objective-c
You can’t perform that action at this time.
0 commit comments