Skip to content

Commit c584eab

Browse files
committed
add repeat alarm [iOS]
1 parent de65223 commit c584eab

File tree

3 files changed

+257
-75
lines changed

3 files changed

+257
-75
lines changed

example/App.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ class App extends Component {
226226
/>
227227
</View>
228228
</View>
229-
<View style={styles.margin}>
229+
<View>
230230
<Button onPress={this.setAlarm} title="Set Alarm" color="#007fff" />
231231
</View>
232232
</View>
233-
<View>
233+
<View style={styles.margin}>
234234
<Text>Alarm Time From Now (in minutes):</Text>
235235
<TextInput
236236
style={styles.date}

example/ios/Example/AppDelegate.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
5858
willPresentNotification:(UNNotification *)notification withCompletionHandler: (void (^)(UNNotificationPresentationOptions options))completionHandler {
5959
NSLog(@"handle push notification: %@", notification.request.content.userInfo);
6060
[RnAlarmNotification didReceiveNotification:notification];
61-
completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
61+
completionHandler(UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert);
6262
}
6363

6464
- (void)userNotificationCenter:(UNUserNotificationCenter *)center

0 commit comments

Comments
 (0)