Ios 手动城市飞艇呼叫UAAppIntegration.userNotificationCenter需要呼叫completionHandler吗?

Ios 手动城市飞艇呼叫UAAppIntegration.userNotificationCenter需要呼叫completionHandler吗?,ios,swift,urbanairship.com,Ios,Swift,Urbanairship.com,我们将appdelegate完成处理程序传递给urbanairship,并在最后调用appdelegate完成处理程序 func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) {

我们将appdelegate完成处理程序传递给urbanairship,并在最后调用appdelegate完成处理程序

    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) {
    UAAppIntegration.userNotificationCenter(center, didReceive: response, withCompletionHandler: completionHandler)
    completionHandler()
}
或者我们在urbanairship completion中调用appdelegate completion处理程序

func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) {
    UAAppIntegration.userNotificationCenter(center, didReceive: response) {
        completionHandler()
    }
}
或者我们只是将完成传递给urbanairship(那么如果我们有代码,我们需要在调用urbanairship之前调用它?)


您需要执行第二个或第三个选项。只能调用一次完成处理程序。查看您必须通过UA呼叫的所有地点和示例。

您想要执行第二个或第三个选项。只能调用一次完成处理程序。查看所有您必须通过UA调用的地方和一个示例。

我想,但由于这是一个黑盒,他们不会说如果他们处理了某件事,他们是否会调用完成处理程序,或者如果我们处理了某件事,我们不应该将其转发给urban?SDK是开源的,因此它不是一个真正的黑盒。回调总是由UA调用。我想,但由于它是一个黑匣子,他们不会说如果他们确实处理了一些事情,或者如果我们处理了一些我们不应该转发给urban的事情,他们是否会调用完成处理程序?SDK是开源的,所以它不是一个真正的黑匣子。UA将始终调用回调。
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) {
    UAAppIntegration.userNotificationCenter(center, didReceive: response, withCompletionHandler: completionHandler)
}