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
8505fc8d
Commit
8505fc8d
authored
Jan 01, 2015
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update example
parent
59794a70
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
5 deletions
+34
-5
project.pbxproj
platforms/ios/NotificationExample.xcodeproj/project.pbxproj
+1
-1
UserInterfaceState.xcuserstate
...data/sebastian.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
APPLocalNotificationOptions.m
...a.plugin.local-notification/APPLocalNotificationOptions.m
+1
-1
UILocalNotification+APPLocalNotification.h
...l-notification/UILocalNotification+APPLocalNotification.h
+1
-1
UILocalNotification+APPLocalNotification.m
...l-notification/UILocalNotification+APPLocalNotification.m
+31
-2
No files found.
platforms/ios/NotificationExample.xcodeproj/project.pbxproj
View file @
8505fc8d
...
@@ -236,10 +236,10 @@
...
@@ -236,10 +236,10 @@
B15E0B313C114B988FFDB3DF
/* APPLocalNotificationOptions.m */
,
B15E0B313C114B988FFDB3DF
/* APPLocalNotificationOptions.m */
,
49F49C19231D4BBE83DBF480
/* UIApplication+APPLocalNotification.h */
,
49F49C19231D4BBE83DBF480
/* UIApplication+APPLocalNotification.h */
,
3FAE800EBDCA42B2A38B569B
/* UIApplication+APPLocalNotification.m */
,
3FAE800EBDCA42B2A38B569B
/* UIApplication+APPLocalNotification.m */
,
DAB48B85CF1041E08D93312D
/* UILocalNotification+APPLocalNotification.m */
,
49A917BFEDB54EBE90626CB7
/* APPLocalNotification.h */
,
49A917BFEDB54EBE90626CB7
/* APPLocalNotification.h */
,
3EEEE9F809E44CCDA96CDFF7
/* APPLocalNotificationOptions.h */
,
3EEEE9F809E44CCDA96CDFF7
/* APPLocalNotificationOptions.h */
,
7C2E1A851E1C499084223237
/* UILocalNotification+APPLocalNotification.h */
,
7C2E1A851E1C499084223237
/* UILocalNotification+APPLocalNotification.h */
,
DAB48B85CF1041E08D93312D
/* UILocalNotification+APPLocalNotification.m */
,
);
);
name
=
Plugins
;
name
=
Plugins
;
path
=
NotificationExample/Plugins
;
path
=
NotificationExample/Plugins
;
...
...
platforms/ios/NotificationExample.xcodeproj/project.xcworkspace/xcuserdata/sebastian.xcuserdatad/UserInterfaceState.xcuserstate
View file @
8505fc8d
No preview for this file type
platforms/ios/NotificationExample/Plugins/de.appplant.cordova.plugin.local-notification/APPLocalNotificationOptions.m
View file @
8505fc8d
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
-
(
BOOL
)
autoCancel
-
(
BOOL
)
autoCancel
{
{
if
(
IsAtLeastiOSVersion
(
@"8.0"
)){
if
(
IsAtLeastiOSVersion
(
@"8.0"
)){
return
YES
;
return
self
.
repeatInterval
==
NSCalendarUnitEra
;
}
else
{
}
else
{
return
[[
dict
objectForKey
:
@"autoCancel"
]
boolValue
];
return
[[
dict
objectForKey
:
@"autoCancel"
]
boolValue
];
}
}
...
...
platforms/ios/NotificationExample/Plugins/de.appplant.cordova.plugin.local-notification/UILocalNotification+APPLocalNotification.h
View file @
8505fc8d
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
// The options provided by the plug-in
// The options provided by the plug-in
-
(
APPLocalNotificationOptions
*
)
options
;
-
(
APPLocalNotificationOptions
*
)
options
;
// Timeinterval since fire date
// Timeinterval since fire date
-
(
NSTimeInterval
)
timeIntervalSinceFireDate
;
-
(
double
)
timeIntervalSinceFireDate
;
// If the fire date was in the past
// If the fire date was in the past
-
(
BOOL
)
wasInThePast
;
-
(
BOOL
)
wasInThePast
;
// If the notification was already triggered
// If the notification was already triggered
...
...
platforms/ios/NotificationExample/Plugins/de.appplant.cordova.plugin.local-notification/UILocalNotification+APPLocalNotification.m
View file @
8505fc8d
...
@@ -96,14 +96,43 @@ static char optionsKey;
...
@@ -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.
* Timeinterval since fire date.
*/
*/
-
(
NSTimeInterval
)
timeIntervalSinceFireDate
-
(
double
)
timeIntervalSinceFireDate
{
{
NSDate
*
now
=
[
NSDate
date
];
NSDate
*
now
=
[
NSDate
date
];
NSDate
*
fireDate
=
self
.
options
.
fireDate
;
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