Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
a729de77
Commit
a729de77
authored
Jan 01, 2015
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix trigger/click issue with repeating notifications on iOS
parent
e8d8cae1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
4 deletions
+33
-4
APPLocalNotificationOptions.m
src/ios/APPLocalNotificationOptions.m
+1
-1
UILocalNotification+APPLocalNotification.h
src/ios/UILocalNotification+APPLocalNotification.h
+1
-1
UILocalNotification+APPLocalNotification.m
src/ios/UILocalNotification+APPLocalNotification.m
+31
-2
No files found.
src/ios/APPLocalNotificationOptions.m
View file @
a729de77
...
...
@@ -82,7 +82,7 @@
-
(
BOOL
)
autoCancel
{
if
(
IsAtLeastiOSVersion
(
@"8.0"
)){
return
YES
;
return
self
.
repeatInterval
==
NSCalendarUnitEra
;
}
else
{
return
[[
dict
objectForKey
:
@"autoCancel"
]
boolValue
];
}
...
...
src/ios/UILocalNotification+APPLocalNotification.h
View file @
a729de77
...
...
@@ -28,7 +28,7 @@
// The options provided by the plug-in
-
(
APPLocalNotificationOptions
*
)
options
;
// Timeinterval since fire date
-
(
NSTimeInterval
)
timeIntervalSinceFireDate
;
-
(
double
)
timeIntervalSinceFireDate
;
// If the fire date was in the past
-
(
BOOL
)
wasInThePast
;
// If the notification was already triggered
...
...
src/ios/UILocalNotification+APPLocalNotification.m
View file @
a729de77
...
...
@@ -96,14 +96,43 @@ static char optionsKey;
}
/**
* The repeating interval in seconds.
*/
-
(
int
)
repeatIntervalInSeconds
{
switch
(
self
.
repeatInterval
)
{
case
NSCalendarUnitMinute
:
return
60
;
case
NSCalendarUnitHour
:
return
60000
;
case
NSCalendarUnitDay
:
case
NSCalendarUnitWeekOfYear
:
case
NSCalendarUnitMonth
:
case
NSCalendarUnitYear
:
return
86400
;
default
:
return
1
;
}
}
/**
* Timeinterval since fire date.
*/
-
(
NSTimeInterval
)
timeIntervalSinceFireDate
-
(
double
)
timeIntervalSinceFireDate
{
NSDate
*
now
=
[
NSDate
date
];
NSDate
*
fireDate
=
self
.
options
.
fireDate
;
return
[
now
timeIntervalSinceDate
:
fireDate
];
int
timespan
=
[
now
timeIntervalSinceDate
:
fireDate
];
if
(
self
.
repeatInterval
!=
NSCalendarUnitEra
)
{
timespan
=
timespan
%
[
self
repeatIntervalInSeconds
];
}
return
timespan
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment