UNNotificationServiceExtension
有一个方法 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 文档。
您的扩展有有限的时间(不超过 30 秒) 修改内容和执行 contentHandler block 。
关于ios - didReceiveNotificationRequest :withContentHandler - execution time limit?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39123351/