【发布时间】:2017-05-29 16:10:15
【问题描述】:
我们将 appdelegate 完成处理程序传递给 urbanairship,并在最后调用 appdelegate 完成处理程序
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) {
UAAppIntegration.userNotificationCenter(center, didReceive: response, withCompletionHandler: completionHandler)
completionHandler()
}
或者我们在 urbanairship 完成中调用 appdelegate 完成处理程序
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) {
UAAppIntegration.userNotificationCenter(center, didReceive: response) {
completionHandler()
}
}
或者我们只是将完成传递给urbanairship(那么如果我们有代码,我们需要在调用urbanairship之前调用它?)
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) {
UAAppIntegration.userNotificationCenter(center, didReceive: response, withCompletionHandler: completionHandler)
}
【问题讨论】:
标签: ios swift urbanairship.com