Skip to content

Commit

Permalink
Merge pull request #11 from Mekor/master
Browse files Browse the repository at this point in the history
修复2处Api更改后的问题.
  • Loading branch information
ChenYilong committed Nov 7, 2016
2 parents c0add64 + ee847e8 commit b90e898
Showing 1 changed file with 4 additions and 6 deletions.
Expand Up @@ -40,11 +40,8 @@ - (void)triggerNotification:(id)sender {
NSArray *notificationActions = @[ acceptAction, declineAction, snoozeAction ];

// create a category
UNNotificationCategory *inviteCategory = [UNNotificationCategory categoryWithIdentifier:CYLInviteCategoryIdentifier
actions:notificationActions
minimalActions:notificationActions
intentIdentifiers:@[]
options:UNNotificationCategoryOptionCustomDismissAction];
UNNotificationCategory *inviteCategory = [UNNotificationCategory categoryWithIdentifier:CYLInviteCategoryIdentifier actions:notificationActions intentIdentifiers:@[] options:UNNotificationCategoryOptionCustomDismissAction];

NSSet *categories = [NSSet setWithObject:inviteCategory];

// registration
Expand Down Expand Up @@ -115,8 +112,9 @@ - (void)triggerNotification:(id)sender {
content.badge = @([[UIApplication sharedApplication] applicationIconBadgeNumber] + 1);
content.launchImageName = @"any string is ok,such as 微博@iOS程序犭袁";
// Deliver the notification in five seconds.
//*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'time interval must be at least 60 if repeating'
UNTimeIntervalNotificationTrigger *trigger = [UNTimeIntervalNotificationTrigger
triggerWithTimeInterval:5.f repeats:YES];
triggerWithTimeInterval:60.0f repeats:YES];
UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:@"FiveSecond"
content:content trigger:trigger];
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
Expand Down

0 comments on commit b90e898

Please sign in to comment.