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
641ff31a
Commit
641ff31a
authored
Jan 29, 2018
by
wezzle
Committed by
Sebastián Katzer
Jan 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save delegate and proxy calls to previous delegate (#1514)
parent
689f47b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
APPLocalNotification.m
src/ios/APPLocalNotification.m
+11
-5
No files found.
src/ios/APPLocalNotification.m
View file @
641ff31a
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
@interface
APPLocalNotification
()
@interface
APPLocalNotification
()
@property
(
strong
,
nonatomic
)
UNUserNotificationCenter
*
center
;
@property
(
strong
,
nonatomic
)
UNUserNotificationCenter
*
center
;
@property
(
NS_NONATOMIC_IOSONLY
,
nullable
,
weak
)
id
<
UNUserNotificationCenterDelegate
>
delegate
;
@property
(
readwrite
,
assign
)
BOOL
deviceready
;
@property
(
readwrite
,
assign
)
BOOL
deviceready
;
@property
(
readwrite
,
assign
)
BOOL
isActive
;
@property
(
readwrite
,
assign
)
BOOL
isActive
;
@property
(
readonly
,
nonatomic
,
retain
)
NSArray
*
launchDetails
;
@property
(
readonly
,
nonatomic
,
retain
)
NSArray
*
launchDetails
;
...
@@ -131,7 +132,7 @@
...
@@ -131,7 +132,7 @@
[
self
fireEvent
:
@"update"
notification
:
notification
];
[
self
fireEvent
:
@"update"
notification
:
notification
];
}
}
[
self
check
:
command
];
[
self
check
:
command
];
}];
}];
}
}
...
@@ -506,9 +507,11 @@
...
@@ -506,9 +507,11 @@
{
{
UNNotificationRequest
*
toast
=
notification
.
request
;
UNNotificationRequest
*
toast
=
notification
.
request
;
if
([
toast
.
trigger
isKindOfClass
:
UNPushNotificationTrigger
.
class
])
if
([
toast
.
trigger
isKindOfClass
:
UNPushNotificationTrigger
.
class
])
{
[
_delegate
userNotificationCenter
:
center
willPresentNotification
:
notification
withCompletionHandler
:
completionHandler
];
return
;
return
;
}
APPNotificationOptions
*
options
=
toast
.
options
;
APPNotificationOptions
*
options
=
toast
.
options
;
if
(
!
[
notification
.
request
wasUpdated
])
{
if
(
!
[
notification
.
request
wasUpdated
])
{
...
@@ -535,9 +538,11 @@
...
@@ -535,9 +538,11 @@
UNNotificationRequest
*
toast
=
response
.
notification
.
request
;
UNNotificationRequest
*
toast
=
response
.
notification
.
request
;
completionHandler
();
completionHandler
();
if
([
toast
.
trigger
isKindOfClass
:
UNPushNotificationTrigger
.
class
])
if
([
toast
.
trigger
isKindOfClass
:
UNPushNotificationTrigger
.
class
])
{
[
_delegate
userNotificationCenter
:
center
didReceiveNotificationResponse
:
response
withCompletionHandler
:
completionHandler
];
return
;
return
;
}
NSMutableDictionary
*
data
=
[[
NSMutableDictionary
alloc
]
init
];
NSMutableDictionary
*
data
=
[[
NSMutableDictionary
alloc
]
init
];
NSString
*
action
=
response
.
actionIdentifier
;
NSString
*
action
=
response
.
actionIdentifier
;
...
@@ -577,6 +582,7 @@
...
@@ -577,6 +582,7 @@
eventQueue
=
[[
NSMutableArray
alloc
]
init
];
eventQueue
=
[[
NSMutableArray
alloc
]
init
];
_center
=
[
UNUserNotificationCenter
currentNotificationCenter
];
_center
=
[
UNUserNotificationCenter
currentNotificationCenter
];
_delegate
=
_center
.
delegate
;
_center
.
delegate
=
self
;
_center
.
delegate
=
self
;
[
_center
registerGeneralNotificationCategory
];
[
_center
registerGeneralNotificationCategory
];
...
...
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