From 25c5005db8f13f087db7c618017f19218dc621ed Mon Sep 17 00:00:00 2001 From: Ulrich GIBERNE Date: Fri, 13 Sep 2024 16:24:31 -0400 Subject: [PATCH] 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")