Skip to content

Commit

Permalink
Merge pull request #334 from mirland/patch-1
Browse files Browse the repository at this point in the history
Fix handle open PN issue
  • Loading branch information
antonoddbit authored Jan 19, 2024
2 parents 2597490 + 3fab87a commit cbff116
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 cbff116

Please sign in to comment.