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
aa4e07b0
Commit
aa4e07b0
authored
Nov 08, 2017
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore delegates if triggered by push notifications (ios)
parent
16c9c426
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
APPLocalNotification.m
src/ios/APPLocalNotification.m
+18
-9
No files found.
src/ios/APPLocalNotification.m
View file @
aa4e07b0
...
...
@@ -504,10 +504,15 @@
willPresentNotification
:
(
UNNotification
*
)
notification
withCompletionHandler
:
(
void
(
^
)(
UNNotificationPresentationOptions
))
completionHandler
{
APPNotificationOptions
*
options
=
notification
.
request
.
options
;
UNNotificationRequest
*
toast
=
notification
.
request
;
if
([
toast
.
trigger
isKindOfClass
:
UNPushNotificationTrigger
.
class
])
return
;
APPNotificationOptions
*
options
=
toast
.
options
;
if
(
!
[
notification
.
request
wasUpdated
])
{
[
self
fireEvent
:
@"trigger"
notification
:
notification
.
reque
st
];
[
self
fireEvent
:
@"trigger"
notification
:
toa
st
];
}
if
(
options
.
silent
)
{
...
...
@@ -525,15 +530,19 @@
*/
-
(
void
)
userNotificationCenter
:
(
UNUserNotificationCenter
*
)
center
didReceiveNotificationResponse
:
(
UNNotificationResponse
*
)
response
withCompletionHandler
:
(
void
(
^
)())
completionHandler
withCompletionHandler
:
(
void
(
^
)(
void
))
completionHandler
{
UNNotificationRequest
*
notification
=
response
.
notification
.
request
;
UNNotificationRequest
*
toast
=
response
.
notification
.
request
;
completionHandler
();
if
([
toast
.
trigger
isKindOfClass
:
UNPushNotificationTrigger
.
class
])
return
;
NSMutableDictionary
*
data
=
[[
NSMutableDictionary
alloc
]
init
];
NSString
*
action
=
response
.
actionIdentifier
;
NSString
*
event
=
action
;
completionHandler
();
if
([
action
isEqualToString
:
UNNotificationDefaultActionIdentifier
])
{
event
=
@"click"
;
}
else
...
...
@@ -542,11 +551,11 @@
}
if
(
!
deviceready
&&
[
event
isEqualToString
:
@"click"
])
{
_launchDetails
=
@[
notification
.
options
.
id
,
event
];
_launchDetails
=
@[
toast
.
options
.
id
,
event
];
}
if
(
!
[
event
isEqualToString
:
@"clear"
])
{
[
self
fireEvent
:
@"clear"
notification
:
notification
];
[
self
fireEvent
:
@"clear"
notification
:
toast
];
}
if
([
response
isKindOfClass
:
UNTextInputNotificationResponse
.
class
])
{
...
...
@@ -554,7 +563,7 @@
forKey
:
@"text"
];
}
[
self
fireEvent
:
event
notification
:
notification
data
:
data
];
[
self
fireEvent
:
event
notification
:
toast
data
:
data
];
}
#pragma mark -
...
...
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