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
d115a53c
Commit
d115a53c
authored
Nov 08, 2017
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented `single` property for location based trigger on iOS
parent
16fa62f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
README.md
README.md
+1
-1
APPNotificationOptions.m
src/ios/APPNotificationOptions.m
+2
-1
local-notification-util.js
www/local-notification-util.js
+1
-0
No files found.
README.md
View file @
d115a53c
...
...
@@ -304,7 +304,7 @@ The properties depend on the trigger type. Not all of them are supported across
| | radius | Int | | | x |
| | notifyOnEntry | Boolean | | | x |
| | notifyOnExit | Boolean | | | x |
| |
repeat | Boolean |
|
| |
single | Boolean | | | x
|
## Progress
...
...
src/ios/APPNotificationOptions.m
View file @
d115a53c
...
...
@@ -461,6 +461,7 @@
{
NSArray
*
center
=
[
self
valueForTriggerOption
:
@"center"
];
double
radius
=
[[
self
valueForTriggerOption
:
@"radius"
]
doubleValue
];
BOOL
single
=
[[
self
valueForTriggerOption
:
@"single"
]
boolValue
];
CLLocationCoordinate2D
coord
=
CLLocationCoordinate2DMake
([
center
[
0
]
doubleValue
],
[
center
[
1
]
doubleValue
]);
...
...
@@ -474,7 +475,7 @@
region
.
notifyOnExit
=
[[
self
valueForTriggerOption
:
@"notifyOnExit"
]
boolValue
];
return
[
UNLocationNotificationTrigger
triggerWithRegion
:
region
repeats
:
YES
];
repeats
:
!
single
];
}
/**
...
...
www/local-notification-util.js
View file @
d115a53c
...
...
@@ -234,6 +234,7 @@ exports.convertTrigger = function (options) {
trigger
.
notifyOnEntry
=
!!
trigger
.
notifyOnEntry
;
trigger
.
notifyOnExit
=
trigger
.
notifyOnExit
===
true
;
trigger
.
radius
=
trigger
.
radius
||
5
;
trigger
.
single
=
!!
trigger
.
single
;
}
if
(
!
isCal
||
trigger
.
at
)
{
...
...
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