Untitled
unknown
plain_text
2 years ago
662 B
13
Indexable
import UserNotifications
import SmartPush
class NotificationService: UNNotificationServiceExtension {
let smartechServiceExtension = SMTNotificationServiceExtension()
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
//...
if SmartPush.sharedInstance().isNotification(fromSmartech:request.content.userInfo){
smartechServiceExtension.didReceive(request, withContentHandler: contentHandler)
}
//...
}
override func serviceExtensionTimeWillExpire() {
//...
smartechServiceExtension.serviceExtensionTimeWillExpire()
//...
}
}Editor is loading...
Leave a Comment