Skip to content

Commit

Permalink
add repeat alarm [iOS]
Browse files Browse the repository at this point in the history
  • Loading branch information
emekalites committed Sep 15, 2020
1 parent de65223 commit c584eab
Show file tree
Hide file tree
Showing 3 changed files with 257 additions and 75 deletions.
4 changes: 2 additions & 2 deletions example/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ class App extends Component {
/>
</View>
</View>
<View style={styles.margin}>
<View>
<Button onPress={this.setAlarm} title="Set Alarm" color="#007fff" />
</View>
</View>
<View>
<View style={styles.margin}>
<Text>Alarm Time From Now (in minutes):</Text>
<TextInput
style={styles.date}
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Example/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
willPresentNotification:(UNNotification *)notification withCompletionHandler: (void (^)(UNNotificationPresentationOptions options))completionHandler {
NSLog(@"handle push notification: %@", notification.request.content.userInfo);
[RnAlarmNotification didReceiveNotification:notification];
completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
completionHandler(UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert);
}

- (void)userNotificationCenter:(UNUserNotificationCenter *)center
Expand Down
Loading

0 comments on commit c584eab

Please sign in to comment.