Skip to content

Commit 0ad56c4

Browse files
Remove usage of the deprecated utils.ios.getter function #157
1 parent 9e4807f commit 0ad56c4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/local-notifications.ios.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as fileSystemModule from "tns-core-modules/file-system";
22
import { fromUrl } from "tns-core-modules/image-source";
3-
import * as utils from "tns-core-modules/utils/utils";
43
import {
54
LocalNotificationsApi,
65
LocalNotificationsCommon,
@@ -132,7 +131,7 @@ export class LocalNotificationsImpl extends LocalNotificationsCommon implements
132131
content.badge = options.badge;
133132

134133
if (options.sound === undefined || options.sound === "default") {
135-
content.sound = utils.ios.getter(UNNotificationSound, UNNotificationSound.defaultSound);
134+
content.sound = UNNotificationSound.defaultSound;
136135
}
137136

138137
const userInfoDict = new NSMutableDictionary({capacity: 1});
@@ -251,7 +250,7 @@ export class LocalNotificationsImpl extends LocalNotificationsCommon implements
251250
notification.alertTitle = options.title;
252251
notification.alertBody = options.body;
253252

254-
notification.timeZone = utils.ios.getter(NSTimeZone, NSTimeZone.defaultTimeZone);
253+
notification.timeZone = NSTimeZone.defaultTimeZone;
255254
notification.applicationIconBadgeNumber = options.badge;
256255

257256
// these are sent back to the plugin when a notification is received

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-local-notifications",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "The Local Notifications plugin allows your app to show notifications when the app is not running. Just like remote push notifications, but a few orders of magnitude easier to set up.",
55
"main": "local-notifications",
66
"typings": "index.d.ts",

0 commit comments

Comments
 (0)