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
fa87fdc5
Commit
fa87fdc5
authored
Oct 03, 2014
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #280 from timothyjasonwilliams/0.7
correctly check ios version
parents
f82b9d32
24354dce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
APPLocalNotification.m
src/ios/APPLocalNotification.m
+19
-19
No files found.
src/ios/APPLocalNotification.m
View file @
fa87fdc5
...
...
@@ -238,18 +238,18 @@
*/
-
(
void
)
promptForPermission
:(
CDVInvokedUrlCommand
*
)
command
{
#ifdef __IPHONE_8_0
UIUserNotificationType
types
=
UIUserNotificationTypeAlert
|
UIUserNotificationTypeBadge
|
UIUserNotificationTypeSound
;
if
([[[
UIDevice
currentDevice
]
systemVersion
]
floatValue
]
>=
8
.
0
)
{
UIUserNotificationType
types
=
UIUserNotificationTypeAlert
|
UIUserNotificationTypeBadge
|
UIUserNotificationTypeSound
;
UIUserNotificationSettings
*
settings
=
[
UIUserNotificationSettings
settingsForTypes
:
types
categories
:
nil
];
UIUserNotificationSettings
*
settings
=
[
UIUserNotificationSettings
settingsForTypes
:
types
categories
:
nil
];
[
self
.
commandDelegate
runInBackground
:
^
{
[[
UIApplication
sharedApplication
]
registerUserNotificationSettings
:
settings
];
}];
#endif
[
self
.
commandDelegate
runInBackground
:
^
{
[[
UIApplication
sharedApplication
]
registerUserNotificationSettings
:
settings
];
}];
}
}
/**
...
...
@@ -257,17 +257,17 @@
*/
-
(
BOOL
)
hasPermissionToSheduleNotifications
{
#ifdef __IPHONE_8_0
UIUserNotificationSettings
*
settings
=
[[
UIApplication
sharedApplication
]
currentUserNotificationSettings
];
if
([[[
UIDevice
currentDevice
]
systemVersion
]
floatValue
]
>=
8
.
0
)
{
UIUserNotificationSettings
*
settings
=
[[
UIApplication
sharedApplication
]
currentUserNotificationSettings
];
UIUserNotificationType
requiredTypes
=
UIUserNotificationTypeAlert
|
UIUserNotificationTypeBadge
|
UIUserNotificationTypeSound
;
UIUserNotificationType
requiredTypes
=
UIUserNotificationTypeAlert
|
UIUserNotificationTypeBadge
|
UIUserNotificationTypeSound
;
return
(
settings
.
types
&
requiredTypes
);
#else
return
YES
;
#endif
return
(
settings
.
types
&
requiredTypes
);
}
else
{
return
YES
;
}
}
/**
...
...
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