File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ Or manual: add the latest version as dependeny to your package.json.
39
39
* {auto-link} Add RNLocalNotifications.xcoderproj into your project in the Libraries folder.
40
40
* {auto-link}Add the .a file on the General tab of your target under Linked Frameworks And Libraries
41
41
* {auto-link}Add the .a file on the Build Phases tab of your target under Link Binary With Libraries
42
- * In the AppDelegate.m file of your xcode project add:
42
+ * In the AppDelegate.m file of your xcode project add: (this will clear all notifications when you open the app)
43
43
```
44
44
- (void)applicationDidBecomeActive:(UIApplication *)application
45
45
{
@@ -51,7 +51,7 @@ Or manual: add the latest version as dependeny to your package.json.
51
51
}
52
52
}
53
53
```
54
- * In the AppDelegate.m file of your xcode project, in the didFinishLaunchingWithOptions function, add:
54
+ * In the AppDelegate.m file of your xcode project, in the didFinishLaunchingWithOptions function, add: (ask the user to allow notifications)
55
55
```
56
56
if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)]) {
57
57
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeSound categories:nil]];
@@ -64,8 +64,10 @@ Or manual: add the latest version as dependeny to your package.json.
64
64
```
65
65
<receiver android:process=":remote" android:name="com.github.wumke.RNLocalNotifications.AlarmReceiver" android:exported="true"></receiver>
66
66
```
67
- * In the MainActivity.java file of your android studio project add:
67
+ * In the MainActivity.java file of your android studio project add: (this will clear all notifications when you open the app)
68
68
```
69
+ import android.content.Context;
70
+ ...
69
71
@Override
70
72
public void onResume() {
71
73
super.onResume();
You can’t perform that action at this time.
0 commit comments