Skip to content

Commit

Permalink
Fix handle open PN issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mirland authored Jan 11, 2024
1 parent 2597490 commit 3fab87a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ios/Classes/SwiftFacebookAppEventsPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,11 @@ public class SwiftFacebookAppEventsPlugin: NSObject, FlutterPlugin {
private func handlePushNotificationOpen(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
let arguments = call.arguments as? [String: Any] ?? [String: Any]()
let payload = arguments["payload"] as? [String: Any]
if let action = arguments["action"] {
let actionString = action as! String
AppEvents.shared.logPushNotificationOpen(payload: payload!, action: actionString)
if let action = arguments["action"] as? String {
AppEvents.shared.logPushNotificationOpen(payload: payload!, action: action)
} else {
AppEvents.shared.logPushNotificationOpen(payload: payload!)
}

result(nil)
}

Expand Down

0 comments on commit 3fab87a

Please sign in to comment.