diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0d6055d..1e6d6c2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Capacitor Plugin Changelog
+## Version 2.2.0 September 25, 2024
+Minor release that updates the iOS SDK to 18.9.2 and adds the method `Airship.messageCenter.showMessageCenter(messageId?: string)` that can be used to show the OOTB Message Center UI even if auto launching Message Center is disabled. This new functionality is useful if the application needs to route the user in the app before processing the display event while still being able to use the OOTB UI.
+
+### Changes
+- Updated Airship iOS SDK to 18.9.2.
+- Added new `showMessageCenter(messageId?: string)` to `MessageCenter`.
+
## Version 2.1.0 September 16, 2024
Minor release that adds `notificationPermissionStatus` to the `PushNotificationStatus` object and a way to specify the fallback when requesting permissions and the permission is already denied.
diff --git a/Package.swift b/Package.swift
index ed359fd..bdc943d 100644
--- a/Package.swift
+++ b/Package.swift
@@ -11,7 +11,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "main"),
- .package(url: "https://github.com/urbanairship/airship-mobile-framework-proxy.git", from: "8.0.0")
+ .package(url: "https://github.com/urbanairship/airship-mobile-framework-proxy.git", from: "8.1.0")
],
targets: [
.target(
diff --git a/UaCapacitorAirship.podspec b/UaCapacitorAirship.podspec
index 1ce1939..f4b4833 100644
--- a/UaCapacitorAirship.podspec
+++ b/UaCapacitorAirship.podspec
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '14.0'
s.dependency 'Capacitor'
s.swift_version = '5.1'
- s.dependency "AirshipFrameworkProxy", "8.0.0"
+ s.dependency "AirshipFrameworkProxy", "8.1.0"
s.default_subspecs = ["Bootloader", "Plugin"]
diff --git a/android/build.gradle b/android/build.gradle
index 6e3d1b8..92802ff 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,5 +1,5 @@
ext {
- airshipProxyVersion = project.hasProperty('airshipProxyVersion') ? rootProject.ext.airshipProxyVersion : '8.0.0'
+ airshipProxyVersion = project.hasProperty('airshipProxyVersion') ? rootProject.ext.airshipProxyVersion : '8.1.0'
}
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index 4b435b5..072fa33 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -14,6 +14,12 @@
android:label="@string/ua_message_center_title"
android:launchMode="singleTask"
android:exported="false">
+
+
+
+
+
+
diff --git a/android/src/main/java/com/airship/capacitor/AirshipCapacitorVersion.kt b/android/src/main/java/com/airship/capacitor/AirshipCapacitorVersion.kt
index ae0066b..74cb9c1 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 = "2.0.1"
+ var version = "2.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 2b3c41b..4d1b727 100644
--- a/android/src/main/java/com/airship/capacitor/AirshipPlugin.kt
+++ b/android/src/main/java/com/airship/capacitor/AirshipPlugin.kt
@@ -179,6 +179,8 @@ class AirshipPlugin : Plugin() {
"messageCenter#dismiss" -> call.resolveResult(method) { proxy.messageCenter.dismiss() }
"messageCenter#display" -> call.resolveResult(method) { proxy.messageCenter.display(arg.string) }
"messageCenter#showMessageView" -> call.resolveResult(method) { proxy.messageCenter.showMessageView(arg.requireString()) }
+ "messageCenter#showMessageCenter" -> call.resolveResult(method) { proxy.messageCenter.showMessageCenter(arg.string) }
+
"messageCenter#markMessageRead" -> call.resolveResult(method) { proxy.messageCenter.markMessageRead(arg.requireString()) }
"messageCenter#deleteMessage" -> call.resolveResult(method) { proxy.messageCenter.deleteMessage(arg.requireString()) }
"messageCenter#getUnreadMessageCount" -> call.resolveResult(method) { proxy.messageCenter.getUnreadMessagesCount() }
diff --git a/ios/Plugin/AirshipCapacitorVersion.swift b/ios/Plugin/AirshipCapacitorVersion.swift
index a4951ec..fdcd022 100644
--- a/ios/Plugin/AirshipCapacitorVersion.swift
+++ b/ios/Plugin/AirshipCapacitorVersion.swift
@@ -3,5 +3,5 @@
import Foundation
class AirshipCapacitorVersion {
- static let version = "2.0.1"
+ static let version = "2.2.0"
}
diff --git a/ios/Plugin/AirshipPlugin.swift b/ios/Plugin/AirshipPlugin.swift
index 2f3389f..88bd4ba 100644
--- a/ios/Plugin/AirshipPlugin.swift
+++ b/ios/Plugin/AirshipPlugin.swift
@@ -343,6 +343,12 @@ public class AirshipPlugin: CAPPlugin, CAPBridgedPlugin {
)
return nil
+ case "messageCenter#showMessageCenter":
+ try AirshipProxy.shared.messageCenter.showMessageCenter(
+ messageID: try? call.requireStringArg()
+ )
+ return nil
+
case "messageCenter#dismiss":
try AirshipProxy.shared.messageCenter.dismiss()
return nil
diff --git a/ios/Podfile b/ios/Podfile
index bdbb823..9d768ad 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', '8.0.0'
+ pod 'AirshipFrameworkProxy', '8.1.0'
end
target 'Plugin' do
diff --git a/package.json b/package.json
index 31356a9..bb8dcbe 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@ua/capacitor-airship",
- "version": "2.1.0",
+ "version": "2.2.0",
"description": "Airship capacitor plugin",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
diff --git a/src/AirshipMessageCenter.ts b/src/AirshipMessageCenter.ts
index ff07b18..7d49406 100644
--- a/src/AirshipMessageCenter.ts
+++ b/src/AirshipMessageCenter.ts
@@ -82,6 +82,16 @@ export class AirshipMessageCenter {
return this.plugin.perform('messageCenter#showMessageView', messageId);
}
+ /**
+ * Overlays the message center regardless if auto launch Message Center is enabled or not.
+ *
+ * @param messageId Optional message Id.
+ * @returns A promise.
+ */
+ public showMessageCenter(messageId?: string): Promise {
+ return this.plugin.perform('messageCenter#showMessageCenter', messageId);
+ }
+
/**
* Refreshes the messages.
* @returns A promise. Will reject if the list fails to refresh or if