From 6672d0fc6bb788c58b1acb40f50d4584d3971164 Mon Sep 17 00:00:00 2001 From: Kamo Spertsyan Date: Mon, 30 Sep 2024 16:39:37 +0300 Subject: [PATCH 1/2] CR fixesThe `setNotificationsToken` and `handleNotification` methods were marked as deprecated. --- QonversionSandwich.podspec | 2 +- android/sandwich/build.gradle | 2 +- .../sandwich/AutomationsSandwich.kt | 2 ++ ios/Podfile | 2 +- ios/Podfile.lock | 20 +++++++++---------- ios/sandwich/AutomationsSandwich.swift | 2 ++ 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/QonversionSandwich.podspec b/QonversionSandwich.podspec index ce2565a..380fdc7 100644 --- a/QonversionSandwich.podspec +++ b/QonversionSandwich.podspec @@ -19,5 +19,5 @@ Pod::Spec.new do |s| s.source_files = 'ios/sandwich/**/*.{h,m,swift}' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } - s.dependency "Qonversion", "5.12.2" + s.dependency "Qonversion", "5.12.3" end diff --git a/android/sandwich/build.gradle b/android/sandwich/build.gradle index cc74df0..62bd271 100644 --- a/android/sandwich/build.gradle +++ b/android/sandwich/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.qonversion_version = '8.1.0' + ext.qonversion_version = '8.1.1' } plugins { diff --git a/android/sandwich/src/main/kotlin/io/qonversion/sandwich/AutomationsSandwich.kt b/android/sandwich/src/main/kotlin/io/qonversion/sandwich/AutomationsSandwich.kt index 6665f1a..b1bef2d 100644 --- a/android/sandwich/src/main/kotlin/io/qonversion/sandwich/AutomationsSandwich.kt +++ b/android/sandwich/src/main/kotlin/io/qonversion/sandwich/AutomationsSandwich.kt @@ -53,10 +53,12 @@ class AutomationsSandwich { return Automations.shared.getNotificationCustomPayload(stringData) } + @Deprecated("Consider removing this method calls. Qonversion is not working with push notifications anymore") fun setNotificationToken(token: String) { Automations.shared.setNotificationsToken(token) } + @Deprecated("Consider removing this method calls. Qonversion is not working with push notifications anymore") fun handleNotification(notificationData: Map): Boolean { val stringData = notificationData.toStringMap() return Automations.shared.handleNotification(stringData) diff --git a/ios/Podfile b/ios/Podfile index 6d9362f..d0166b6 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -6,7 +6,7 @@ platform :ios, '9.0' use_frameworks! target 'QonversionSandwich' do - pod 'Qonversion', '5.12.2' + pod 'Qonversion', '5.12.3' end target 'Sample' do diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 2996b33..3370ecc 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,12 +1,12 @@ PODS: - - Qonversion (5.12.0): - - Qonversion/Main (= 5.12.0) - - Qonversion/Main (5.12.0) - - QonversionSandwich (5.0.3): - - Qonversion (= 5.12.0) + - Qonversion (5.12.3): + - Qonversion/Main (= 5.12.3) + - Qonversion/Main (5.12.3) + - QonversionSandwich (5.1.4): + - Qonversion (= 5.12.3) DEPENDENCIES: - - Qonversion (= 5.12.0) + - Qonversion (= 5.12.3) - QonversionSandwich (from `../`) SPEC REPOS: @@ -18,9 +18,9 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - Qonversion: ac2da69e497cb1f01cea13d82513fde14f338ca3 - QonversionSandwich: 11c3c29fccb4c0d22127df6e00a43ffbe461ab96 + Qonversion: d1a0c6aeff9ba9772ed5020899c2b13422f6aff1 + QonversionSandwich: dc19e93ac2f3bf41c5de788446c8e6da4bd90939 -PODFILE CHECKSUM: 270a709ed1c745b2fbcd44832cb6e9be9fbbafe3 +PODFILE CHECKSUM: 22b04f6e2a93c5c342a95555267c470b275d6301 -COCOAPODS: 1.15.2 +COCOAPODS: 1.13.0 diff --git a/ios/sandwich/AutomationsSandwich.swift b/ios/sandwich/AutomationsSandwich.swift index b6e7274..358f91b 100644 --- a/ios/sandwich/AutomationsSandwich.swift +++ b/ios/sandwich/AutomationsSandwich.swift @@ -38,6 +38,7 @@ public class AutomationsSandwich : NSObject { } } + @available(*, deprecated, message: "Consider removing this method calls. Qonversion is not working with push notifications anymore") @objc public func setNotificationToken(_ token: String) { let tokenData: Data = token.toData() Qonversion.Automations.shared().setNotificationsToken(tokenData) @@ -47,6 +48,7 @@ public class AutomationsSandwich : NSObject { return Qonversion.Automations.shared().getNotificationCustomPayload(notificationData) } + @available(*, deprecated, message: "Consider removing this method calls. Qonversion is not working with push notifications anymore") @objc public func handleNotification(_ notificationData: [AnyHashable: Any]) -> Bool { return Qonversion.Automations.shared().handleNotification(notificationData) } From abf1061beea1bf9582a6694409514816ae609ce9 Mon Sep 17 00:00:00 2001 From: Kamo Spertsyan Date: Tue, 1 Oct 2024 17:32:17 +0300 Subject: [PATCH 2/2] CR fixes --- .../main/kotlin/io/qonversion/sandwich/AutomationsSandwich.kt | 4 ++-- ios/sandwich/AutomationsSandwich.swift | 2 -- ios/sandwich/QonversionSandwich.swift | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/android/sandwich/src/main/kotlin/io/qonversion/sandwich/AutomationsSandwich.kt b/android/sandwich/src/main/kotlin/io/qonversion/sandwich/AutomationsSandwich.kt index b1bef2d..3b4bcf3 100644 --- a/android/sandwich/src/main/kotlin/io/qonversion/sandwich/AutomationsSandwich.kt +++ b/android/sandwich/src/main/kotlin/io/qonversion/sandwich/AutomationsSandwich.kt @@ -53,14 +53,14 @@ class AutomationsSandwich { return Automations.shared.getNotificationCustomPayload(stringData) } - @Deprecated("Consider removing this method calls. Qonversion is not working with push notifications anymore") fun setNotificationToken(token: String) { + @Suppress("DEPRECATION") Automations.shared.setNotificationsToken(token) } - @Deprecated("Consider removing this method calls. Qonversion is not working with push notifications anymore") fun handleNotification(notificationData: Map): Boolean { val stringData = notificationData.toStringMap() + @Suppress("DEPRECATION") return Automations.shared.handleNotification(stringData) } diff --git a/ios/sandwich/AutomationsSandwich.swift b/ios/sandwich/AutomationsSandwich.swift index 358f91b..b6e7274 100644 --- a/ios/sandwich/AutomationsSandwich.swift +++ b/ios/sandwich/AutomationsSandwich.swift @@ -38,7 +38,6 @@ public class AutomationsSandwich : NSObject { } } - @available(*, deprecated, message: "Consider removing this method calls. Qonversion is not working with push notifications anymore") @objc public func setNotificationToken(_ token: String) { let tokenData: Data = token.toData() Qonversion.Automations.shared().setNotificationsToken(tokenData) @@ -48,7 +47,6 @@ public class AutomationsSandwich : NSObject { return Qonversion.Automations.shared().getNotificationCustomPayload(notificationData) } - @available(*, deprecated, message: "Consider removing this method calls. Qonversion is not working with push notifications anymore") @objc public func handleNotification(_ notificationData: [AnyHashable: Any]) -> Bool { return Qonversion.Automations.shared().handleNotification(notificationData) } diff --git a/ios/sandwich/QonversionSandwich.swift b/ios/sandwich/QonversionSandwich.swift index 2af517c..1fcb1a0 100644 --- a/ios/sandwich/QonversionSandwich.swift +++ b/ios/sandwich/QonversionSandwich.swift @@ -176,7 +176,7 @@ public class QonversionSandwich : NSObject { } #if os(iOS) - @available (iOS 14.0, *) + @available(iOS 14.0, *) @objc public func presentCodeRedemptionSheet() { Qonversion.shared().presentCodeRedemptionSheet() }