From 772797925af5e985947d267a1f6dbed20fa20467 Mon Sep 17 00:00:00 2001 From: Ognjen Ristanovic Date: Mon, 18 Sep 2023 17:46:52 +0200 Subject: [PATCH] tests --- urbanairship-cordova/plugin.xml | 2 +- urbanairship-cordova/src/ios/AirshipCordova.swift | 14 +++++++------- .../src/ios/events/UACordovaPushEvent.m | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/urbanairship-cordova/plugin.xml b/urbanairship-cordova/plugin.xml index 9d89dc8c..049c7fe3 100644 --- a/urbanairship-cordova/plugin.xml +++ b/urbanairship-cordova/plugin.xml @@ -201,7 +201,7 @@ - + diff --git a/urbanairship-cordova/src/ios/AirshipCordova.swift b/urbanairship-cordova/src/ios/AirshipCordova.swift index 65a23092..52f1396a 100644 --- a/urbanairship-cordova/src/ios/AirshipCordova.swift +++ b/urbanairship-cordova/src/ios/AirshipCordova.swift @@ -104,7 +104,7 @@ public class AirshipCordova: NSObject { try? AirshipProxy.shared.attemptTakeOff(launchOptions: launchOptions) Task { - let stream = await AirshipProxyEventEmitter.shared.pendingEventTypeAdded + let stream = await AirshipProxyEventEmitter.shared.pendingEventAdded for await _ in stream { await self.eventNotifier.notifyPendingEvents() } @@ -263,7 +263,7 @@ public extension AirshipCordova { @objc func pushGetNotificationStatus() async throws -> [String: Any] { - return try AirshipProxy.shared.push.getNotificationStatus() + return try await AirshipProxy.shared.push.getNotificationStatus() } @objc @@ -293,8 +293,8 @@ public extension AirshipCordova { } @objc - func pushGetAuthorizedNotificationStatus() throws -> [String : Any] { - return try AirshipProxy.shared.push.getNotificationStatus() + func pushGetAuthorizedNotificationStatus() async throws -> [String : Any] { + return try await AirshipProxy.shared.push.getNotificationStatus() } @objc @@ -319,7 +319,7 @@ public extension AirshipCordova { func actionsRun(actionName: String, actionValue: Any?) async throws-> Any? { return try await AirshipProxy.shared.action.runAction( actionName, - actionValue: try AirshipJSON.wrap(actionValue) + value: try AirshipJSON.wrap(actionValue) ) } } @@ -356,7 +356,7 @@ public extension AirshipCordova { @objc func contactGetNamedUserIdOrEmtpy() async throws -> String { - return try AirshipProxy.shared.contact.getNamedUser() ?? "" + return try await AirshipProxy.shared.contact.getNamedUser() ?? "" } @objc @@ -434,7 +434,7 @@ public extension AirshipCordova { @objc func messageCenterGetMessages() async throws -> [Any] { - return try AirshipProxy.shared.messageCenter.getMessagesJSON() + return try await AirshipProxy.shared.messageCenter.getMessagesJSON() } @objc diff --git a/urbanairship-cordova/src/ios/events/UACordovaPushEvent.m b/urbanairship-cordova/src/ios/events/UACordovaPushEvent.m index ddc5f21e..53509625 100644 --- a/urbanairship-cordova/src/ios/events/UACordovaPushEvent.m +++ b/urbanairship-cordova/src/ios/events/UACordovaPushEvent.m @@ -1,7 +1,7 @@ /* Copyright Urban Airship and Contributors */ #import "UACordovaPushEvent.h" - +/* NSString *const EventPushReceived = @"urbanairship.push"; @implementation UACordovaPushEvent @@ -85,3 +85,4 @@ + (NSDictionary *)pushEventDataFromNotificationContent:(NSDictionary *)userInfo } @end +*/