import UIKit
import Foundation
import Gleap
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
@available(iOS 10.0, *)
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
let userInfo = response.notification.request.content.userInfo
print("Handle push from background or closed \(userInfo)")
// Check for specific notification indicating it's from "GLEAP"
if let sender = userInfo["sender"] as? String, sender == "GLEAP" {
Gleap.handlePushNotification(userInfo)
}
completionHandler()
}
// Add other necessary AppDelegate methods...
}