Skip to content

Commit

Permalink
simplify again
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrico972 committed Sep 13, 2024
1 parent 91373b7 commit 25c5005
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ios/Classes/SwiftAirshipPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 25c5005

Please sign in to comment.