Loading src/ios/APPLocalNotificationOptions.h +2 −0 Changes for src/ios/APPLocalNotificationOptions.h: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -35,5 +35,7 @@ // Encode the user info dict to JSON - (NSString*) encodeToJSON; // If it's a repeating notification - (BOOL) isRepeating; @end src/ios/APPLocalNotificationOptions.m +14 −1 Changes for src/ios/APPLocalNotificationOptions.m: 14 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ - (BOOL) autoCancel { if (IsAtLeastiOSVersion(@"8.0")){ return self.repeatInterval == NSCalendarUnitEra; return ![self isRepeating]; } else { return [[dict objectForKey:@"autoCancel"] boolValue]; } Loading Loading @@ -201,6 +201,9 @@ return NSCalendarUnitEra; } #pragma mark - #pragma mark Methods /** * The notification's user info dict. */ Loading Loading @@ -231,6 +234,16 @@ withString:@""]; } /** * If it's a repeating notification. */ - (BOOL) isRepeating { NSCalendarUnit interval = self.repeatInterval; return !(interval == NSCalendarUnitEra || interval == 0); } #pragma mark - #pragma mark Helpers Loading src/ios/UILocalNotification+APPLocalNotification.h +2 −0 Changes for src/ios/UILocalNotification+APPLocalNotification.h: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -33,5 +33,7 @@ - (BOOL) wasInThePast; // If the notification was already triggered - (BOOL) wasTriggered; // If it's a repeating notification - (BOOL) isRepeating; @end src/ios/UILocalNotification+APPLocalNotification.m +12 −1 Changes for src/ios/UILocalNotification+APPLocalNotification.m: 12 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -61,6 +61,9 @@ static char optionsKey; self.soundName = options.soundName; } #pragma mark - #pragma mark Methods /** * The options provided by the plug-in. */ Loading Loading @@ -128,7 +131,7 @@ static char optionsKey; int timespan = [now timeIntervalSinceDate:fireDate]; if (self.repeatInterval != NSCalendarUnitEra) { if ([self isRepeating]) { timespan = timespan % [self repeatIntervalInSeconds]; } Loading Loading @@ -156,4 +159,12 @@ static char optionsKey; return isLaterThanOrEqualTo; } /** * If it's a repeating notification. */ - (BOOL) isRepeating { return [self.options isRepeating]; } @end Loading
src/ios/APPLocalNotificationOptions.h +2 −0 Changes for src/ios/APPLocalNotificationOptions.h: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -35,5 +35,7 @@ // Encode the user info dict to JSON - (NSString*) encodeToJSON; // If it's a repeating notification - (BOOL) isRepeating; @end
src/ios/APPLocalNotificationOptions.m +14 −1 Changes for src/ios/APPLocalNotificationOptions.m: 14 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ - (BOOL) autoCancel { if (IsAtLeastiOSVersion(@"8.0")){ return self.repeatInterval == NSCalendarUnitEra; return ![self isRepeating]; } else { return [[dict objectForKey:@"autoCancel"] boolValue]; } Loading Loading @@ -201,6 +201,9 @@ return NSCalendarUnitEra; } #pragma mark - #pragma mark Methods /** * The notification's user info dict. */ Loading Loading @@ -231,6 +234,16 @@ withString:@""]; } /** * If it's a repeating notification. */ - (BOOL) isRepeating { NSCalendarUnit interval = self.repeatInterval; return !(interval == NSCalendarUnitEra || interval == 0); } #pragma mark - #pragma mark Helpers Loading
src/ios/UILocalNotification+APPLocalNotification.h +2 −0 Changes for src/ios/UILocalNotification+APPLocalNotification.h: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -33,5 +33,7 @@ - (BOOL) wasInThePast; // If the notification was already triggered - (BOOL) wasTriggered; // If it's a repeating notification - (BOOL) isRepeating; @end
src/ios/UILocalNotification+APPLocalNotification.m +12 −1 Changes for src/ios/UILocalNotification+APPLocalNotification.m: 12 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -61,6 +61,9 @@ static char optionsKey; self.soundName = options.soundName; } #pragma mark - #pragma mark Methods /** * The options provided by the plug-in. */ Loading Loading @@ -128,7 +131,7 @@ static char optionsKey; int timespan = [now timeIntervalSinceDate:fireDate]; if (self.repeatInterval != NSCalendarUnitEra) { if ([self isRepeating]) { timespan = timespan % [self repeatIntervalInSeconds]; } Loading Loading @@ -156,4 +159,12 @@ static char optionsKey; return isLaterThanOrEqualTo; } /** * If it's a repeating notification. */ - (BOOL) isRepeating { return [self.options isRepeating]; } @end