From 65e744bcf1bd967175bb86ec871b59deca204baa Mon Sep 17 00:00:00 2001 From: Ryan Lepinski Date: Thu, 2 May 2024 23:57:57 -0700 Subject: [PATCH] [MOBILE-4459] Release 1.2.0 (#3) * Release 1.2.0 * Update changelog * Update --- CHANGELOG.md | 9 +++++++++ UaCapacitorAirship.podspec | 2 +- android/build.gradle | 2 +- .../airship/capacitor/AirshipCapacitorVersion.kt | 2 +- .../java/com/airship/capacitor/AirshipPlugin.kt | 2 +- ios/Plugin/AirshipCapacitorVersion.swift | 2 +- ios/Plugin/AirshipPlugin.swift | 15 +-------------- ios/Podfile | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/types.ts | 8 ++++++++ 11 files changed, 27 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66e3628..0c5db16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Capacitor Plugin Changelog +## Version 1.2.0 May 2, 2024 + +Minor release that fixes push events on Android. + +### Changes +- Fixed push events on Android. +- Added `isForeground` to push received events to indicate the application state when the push was received. +- Updated iOS SDK to 18.1.2 + ## Version 1.1.0 April 18, 2024 Minor release that updates the Airship SDKs. diff --git a/UaCapacitorAirship.podspec b/UaCapacitorAirship.podspec index fe734e9..63b49fc 100644 --- a/UaCapacitorAirship.podspec +++ b/UaCapacitorAirship.podspec @@ -14,5 +14,5 @@ Pod::Spec.new do |s| s.ios.deployment_target = '14.0' s.dependency 'Capacitor' s.swift_version = '5.1' - s.dependency "AirshipFrameworkProxy", "6.0.0" + s.dependency "AirshipFrameworkProxy", "6.1.2" end diff --git a/android/build.gradle b/android/build.gradle index dba27bf..c0cf0ce 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -56,7 +56,7 @@ repositories { } dependencies { - def proxyVersion = '6.0.0' + def proxyVersion = '6.1.2' def airshipVersion = '17.8.0' def kotlinVersion = project.hasProperty('kotlinVersion') ? rootProject.ext.kotlinVersion : '1.8.20' diff --git a/android/src/main/java/com/airship/capacitor/AirshipCapacitorVersion.kt b/android/src/main/java/com/airship/capacitor/AirshipCapacitorVersion.kt index 7291739..9ae5910 100644 --- a/android/src/main/java/com/airship/capacitor/AirshipCapacitorVersion.kt +++ b/android/src/main/java/com/airship/capacitor/AirshipCapacitorVersion.kt @@ -3,5 +3,5 @@ package com.airship.capacitor object AirshipCapacitorVersion { - var version = "1.1.0" + var version = "1.2.0" } \ No newline at end of file diff --git a/android/src/main/java/com/airship/capacitor/AirshipPlugin.kt b/android/src/main/java/com/airship/capacitor/AirshipPlugin.kt index 2314e97..18610e3 100644 --- a/android/src/main/java/com/airship/capacitor/AirshipPlugin.kt +++ b/android/src/main/java/com/airship/capacitor/AirshipPlugin.kt @@ -43,7 +43,7 @@ class AirshipPlugin : Plugin() { EventType.MESSAGE_CENTER_UPDATED to "message_center_updated", EventType.PUSH_TOKEN_RECEIVED to "push_token_received", EventType.FOREGROUND_PUSH_RECEIVED to "push_received", - EventType.BACKGROUND_PUSH_RECEIVED to "background_push_received", + EventType.BACKGROUND_PUSH_RECEIVED to "push_received", EventType.NOTIFICATION_STATUS_CHANGED to "notification_status_changed" ) } diff --git a/ios/Plugin/AirshipCapacitorVersion.swift b/ios/Plugin/AirshipCapacitorVersion.swift index 71df27c..9100607 100644 --- a/ios/Plugin/AirshipCapacitorVersion.swift +++ b/ios/Plugin/AirshipCapacitorVersion.swift @@ -3,5 +3,5 @@ import Foundation class AirshipCapacitorVersion { - static let version = "1.1.0" + static let version = "1.2.0" } diff --git a/ios/Plugin/AirshipPlugin.swift b/ios/Plugin/AirshipPlugin.swift index 63b361b..d75dfb3 100644 --- a/ios/Plugin/AirshipPlugin.swift +++ b/ios/Plugin/AirshipPlugin.swift @@ -262,14 +262,8 @@ public class AirshipPlugin: CAPPlugin { return try AirshipProxy.shared.push.isQuietTimeEnabled() case "push#ios#setQuietTime": - let proxySettings: CodableQuietTimeSettings = try call.requireCodableArg() try AirshipProxy.shared.push.setQuietTime( - QuietTimeSettings( - startHour: proxySettings.startHour, - startMinute: proxySettings.startMinute, - endHour: proxySettings.endHour, - endMinute: proxySettings.endMinute - ) + try call.requireCodableArg() ) return nil @@ -561,10 +555,3 @@ extension CAPPluginCall { throw AirshipErrors.error("Argument must be a double") } } - -public struct CodableQuietTimeSettings: Codable { - let startHour: UInt - let startMinute: UInt - let endHour: UInt - let endMinute: UInt -} diff --git a/ios/Podfile b/ios/Podfile index 43ea7ba..0e10a4e 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -5,7 +5,7 @@ def capacitor_pods use_frameworks! pod 'Capacitor', :path => '../node_modules/@capacitor/ios' pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios' - pod 'AirshipFrameworkProxy', '6.0.0' + pod 'AirshipFrameworkProxy', '6.1.2' end target 'Plugin' do diff --git a/package-lock.json b/package-lock.json index e44c3fc..a2f8d35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ua/capacitor-airship", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ua/capacitor-airship", - "version": "1.1.0", + "version": "1.2.0", "license": "Apache-2.0", "devDependencies": { "@capacitor/android": "^5.0.0", diff --git a/package.json b/package.json index e881036..935040e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ua/capacitor-airship", - "version": "1.1.0", + "version": "1.2.0", "description": "Airship capacitor plugin", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", diff --git a/src/types.ts b/src/types.ts index 848de22..805ccba 100644 --- a/src/types.ts +++ b/src/types.ts @@ -30,7 +30,15 @@ export interface PushTokenReceivedEvent { * Event fired when a push is received. */ export interface PushReceivedEvent { + /** + * The push payload. + */ pushPayload: PushPayload; + + /** + * Indicates whether the push was received when the application was in the background or foreground. + */ + isForeground: boolean; } /**