didReceiveNotificationRequest:withContentHandler - 执行时间限制?
didReceiveNotificationRequest:withContentHandler - execution time limit?
UNNotificationServiceExtension
has a method didReceiveNotificationRequest:withContentHandler
处理通知变更。
它有一个非常模糊的描述,关于超时时间:
That method has a limited amount of time to perform its task and execute the provided completion block. If your method does not finish in time,
这里是 serviceExtensionTimeWillExpire
方法的描述:
If your didReceiveNotificationRequest:withContentHandler: method takes to long to execute its completion block, the system calls this method on a separate thread to give you one last chance to execute the block.
我不完全明白,“to long to execute”是什么意思。 它有任何量化数据吗?它是否因运行的设备而异?
谢谢!
摘自上面的 Apple 文档 link。
您的扩展有时间限制(不超过 30 秒) 修改内容并执行 contentHandler 块。
UNNotificationServiceExtension
has a method didReceiveNotificationRequest:withContentHandler
处理通知变更。
它有一个非常模糊的描述,关于超时时间:
That method has a limited amount of time to perform its task and execute the provided completion block. If your method does not finish in time,
这里是 serviceExtensionTimeWillExpire
方法的描述:
If your didReceiveNotificationRequest:withContentHandler: method takes to long to execute its completion block, the system calls this method on a separate thread to give you one last chance to execute the block.
我不完全明白,“to long to execute”是什么意思。 它有任何量化数据吗?它是否因运行的设备而异?
谢谢!
摘自上面的 Apple 文档 link。
您的扩展有时间限制(不超过 30 秒) 修改内容并执行 contentHandler 块。