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
22ec9056
Commit
22ec9056
authored
Jun 30, 2017
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace self.center to _center
parent
96a5ed36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
APPLocalNotification.m
src/ios/APPLocalNotification.m
+20
-20
No files found.
src/ios/APPLocalNotification.m
View file @
22ec9056
...
...
@@ -100,7 +100,7 @@
// NSNumber* id = [options objectForKey:@"id"];
// UNNotificationRequest* notification;
//
// notification = [
self.
center getNotificationWithId:id];
// notification = [
_
center getNotificationWithId:id];
//
// if (!notification)
// continue;
...
...
@@ -151,16 +151,16 @@
[
self
.
commandDelegate
runInBackground
:
^
{
for
(
NSNumber
*
id
in
command
.
arguments
)
{
UNNotificationRequest
*
notification
;
notification
=
[
self
.
center
getNotificationWithId
:
id
];
notification
=
[
_
center
getNotificationWithId
:
id
];
if
(
!
notification
)
continue
;
[
self
.
center
clearNotification
:
notification
];
[
_
center
clearNotification
:
notification
];
[
self
fireEvent
:
@"clear"
notification
:
notification
];
}
[
self
execCallback
:
command
];
}];
}
...
...
@@ -173,7 +173,7 @@
-
(
void
)
clearAll
:(
CDVInvokedUrlCommand
*
)
command
{
[
self
.
commandDelegate
runInBackground
:
^
{
[
self
.
center
clearAllNotifications
];
[
_
center
clearAllNotifications
];
[
self
.
app
setApplicationIconBadgeNumber
:
0
];
[
self
fireEvent
:
@"clearall"
];
[
self
execCallback
:
command
];
...
...
@@ -192,13 +192,13 @@
[
self
.
commandDelegate
runInBackground
:
^
{
for
(
NSNumber
*
id
in
command
.
arguments
)
{
UNNotificationRequest
*
notification
;
notification
=
[
self
.
center
getNotificationWithId
:
id
];
notification
=
[
_
center
getNotificationWithId
:
id
];
if
(
!
notification
)
continue
;
[
self
.
center
cancelNotification
:
notification
];
[
_
center
cancelNotification
:
notification
];
[
self
fireEvent
:
@"cancel"
notification
:
notification
];
}
...
...
@@ -214,7 +214,7 @@
-
(
void
)
cancelAll
:(
CDVInvokedUrlCommand
*
)
command
{
[
self
.
commandDelegate
runInBackground
:
^
{
[
self
.
center
cancelAllNotifications
];
[
_
center
cancelAllNotifications
];
[
self
.
app
setApplicationIconBadgeNumber
:
0
];
[
self
fireEvent
:
@"cancelall"
];
[
self
execCallback
:
command
];
...
...
@@ -321,12 +321,12 @@
byType
:
(
APPNotificationType
)
type
;
{
[
self
.
commandDelegate
runInBackground
:
^
{
NSArray
*
ids
=
[
self
.
center
getNotificationIdsByType
:
type
];
NSArray
*
ids
=
[
_
center
getNotificationIdsByType
:
type
];
CDVPluginResult
*
result
;
result
=
[
CDVPluginResult
resultWithStatus
:
CDVCommandStatus_OK
messageAsArray
:
ids
];
[
self
.
commandDelegate
sendPluginResult
:
result
callbackId
:
command
.
callbackId
];
}];
...
...
@@ -383,11 +383,11 @@
NSArray
*
notifications
;
notifications
=
[
_center
getNotificationOptionsByType
:
type
andId
:
ids
];
CDVPluginResult
*
result
;
result
=
[
CDVPluginResult
resultWithStatus
:
CDVCommandStatus_OK
messageAsDictionary
:[
notifications
firstObject
]];
[
self
.
commandDelegate
sendPluginResult
:
result
callbackId
:
command
.
callbackId
];
}];
...
...
@@ -497,7 +497,7 @@
UNAuthorizationOptions
options
=
(
UNAuthorizationOptionBadge
|
UNAuthorizationOptionSound
|
UNAuthorizationOptionAlert
);
[
self
.
center
requestAuthorizationWithOptions
:
options
completionHandler
:
^
(
BOOL
granted
,
NSError
*
e
)
{
[
_
center
requestAuthorizationWithOptions
:
options
completionHandler
:
^
(
BOOL
granted
,
NSError
*
e
)
{
[
self
check
:
command
];
}];
}
...
...
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