From c8c350d82d90aa773393d2c4b40aa9d5ecf8a675 Mon Sep 17 00:00:00 2001 From: tahourj Date: Wed, 1 Apr 2020 11:33:33 +0200 Subject: [PATCH] chore(docs): Updated readme for APNs installation (#93) --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e19cace20..1840d518c 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,33 @@ react-native link @react-native-community/push-notification-ios If you don't want to use the methods above, you can always [link the library manually](./docs/manual-linking.md). -### Update `AppDelegate.m` +### Add Capabilities : Background Mode - Remote Notifications + +Go into your MyReactProject/ios dir and open MyProject.xcworkspace workspace. +Select the top project "MyProject" ans select the "Signing & Capabilities" tab. +Add a 2 new Capabilities using "+" button: +- `Background Mode` capability and tick `Remote Notifications`. +- `Push Notifications` capability + + +### Augment `AppDelegate` Finally, to enable support for `notification` and `register` events you need to augment your AppDelegate. +### Update `AppDelegate.h` + +At the top of the file: +```objective-c +#import +``` + +Then, add the 'UNUserNotificationCenterDelegate' to protocols: + +```objective-c +@interface AppDelegate : UIResponder +``` +### Update `AppDelegate.m` + At the top of the file: ```objective-c