From 91373b7f8d3591a29cdfe26ad20244d4f8936249 Mon Sep 17 00:00:00 2001 From: Ulrich GIBERNE Date: Fri, 13 Sep 2024 15:50:54 -0400 Subject: [PATCH 1/2] prepare patch release 7.8.2 --- CHANGELOG.md | 8 ++++++++ .../kotlin/com/airship/flutter/AirshipPluginVersion.kt | 2 +- ios/Classes/AirshipPluginVersion.swift | 2 +- ios/Classes/SwiftAirshipPlugin.swift | 3 ++- ios/airship_flutter.podspec | 2 +- pubspec.yaml | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25fa0ff1..62340563 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Flutter Plugin Changelog +## Version 7.8.2 - September 13, 2024 + +Patch release that fixes a potential Swift compile error. + +### Changes + +- Fixed a potential Swift compile error. + ## Version 7.8.1 - September 10, 2024 Patch release that brings back in-app messages methods and fixes a potential Swift compile error. diff --git a/android/src/main/kotlin/com/airship/flutter/AirshipPluginVersion.kt b/android/src/main/kotlin/com/airship/flutter/AirshipPluginVersion.kt index a5c2a0e4..4c3b2459 100644 --- a/android/src/main/kotlin/com/airship/flutter/AirshipPluginVersion.kt +++ b/android/src/main/kotlin/com/airship/flutter/AirshipPluginVersion.kt @@ -2,6 +2,6 @@ package com.airship.flutter class AirshipPluginVersion { companion object { - const val AIRSHIP_PLUGIN_VERSION = "7.8.1" + const val AIRSHIP_PLUGIN_VERSION = "7.8.2" } } diff --git a/ios/Classes/AirshipPluginVersion.swift b/ios/Classes/AirshipPluginVersion.swift index 576e6ba6..59d4c16c 100644 --- a/ios/Classes/AirshipPluginVersion.swift +++ b/ios/Classes/AirshipPluginVersion.swift @@ -1,5 +1,5 @@ import Foundation class AirshipPluginVersion { - static let pluginVersion = "7.8.1" + static let pluginVersion = "7.8.2" } diff --git a/ios/Classes/SwiftAirshipPlugin.swift b/ios/Classes/SwiftAirshipPlugin.swift index 2fb266e1..6b1936a5 100644 --- a/ios/Classes/SwiftAirshipPlugin.swift +++ b/ios/Classes/SwiftAirshipPlugin.swift @@ -452,7 +452,8 @@ public class SwiftAirshipPlugin: NSObject, FlutterPlugin { return try AirshipJSON.wrap(flag).unWrap() case "featureFlagManager#trackInteraction": - guard let arg = try? call.requireAnyArg() as? String else { + guard let argument = try? call.requireAnyArg(), + let arg = argument as? String else { throw AirshipErrors.error("Call requires a String argument") } diff --git a/ios/airship_flutter.podspec b/ios/airship_flutter.podspec index 6813b94a..d0ffe797 100644 --- a/ios/airship_flutter.podspec +++ b/ios/airship_flutter.podspec @@ -1,5 +1,5 @@ -AIRSHIP_FLUTTER_VERSION="7.8.1" +AIRSHIP_FLUTTER_VERSION="7.8.2" # # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html diff --git a/pubspec.yaml b/pubspec.yaml index 3ad4d4c0..629521c7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: airship_flutter description: "Cross-platform plugin interface for the native Airship iOS and Android SDKs. Simplifies adding Airship to Flutter apps." -version: 7.8.1 +version: 7.8.2 homepage: https://www.airship.com/ repository: https://github.com/urbanairship/airship-flutter issue_tracker: https://github.com/urbanairship/airship-flutter/issues From 25c5005db8f13f087db7c618017f19218dc621ed Mon Sep 17 00:00:00 2001 From: Ulrich GIBERNE Date: Fri, 13 Sep 2024 16:24:31 -0400 Subject: [PATCH 2/2] simplify again --- ios/Classes/SwiftAirshipPlugin.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ios/Classes/SwiftAirshipPlugin.swift b/ios/Classes/SwiftAirshipPlugin.swift index 6b1936a5..1980f4c1 100644 --- a/ios/Classes/SwiftAirshipPlugin.swift +++ b/ios/Classes/SwiftAirshipPlugin.swift @@ -452,11 +452,7 @@ public class SwiftAirshipPlugin: NSObject, FlutterPlugin { return try AirshipJSON.wrap(flag).unWrap() case "featureFlagManager#trackInteraction": - guard let argument = try? call.requireAnyArg(), - let arg = argument as? String else { - throw AirshipErrors.error("Call requires a String argument") - } - + let arg = try call.requireStringArg() guard let jsonData = arg.data(using: .utf8), let featureFlagProxy = try? JSONDecoder().decode(FeatureFlagProxy.self, from: jsonData) else { throw AirshipErrors.error("Call requires a json string that's decodable to FeatureFlagProxy")