gpt4 book ai didi

ios - AVHapticPlayer 异步调用完成 WithCompletionHandler : (type=3) did not get a reply after 30 seconds

转载 作者:可可西里 更新时间:2023-11-01 01:50:53 39 4
gpt4 key购买 nike

问题

我在我的应用程序中使用触觉反馈 来响应用户移动某些图 block 的情况。当瓷砖移动得非常快时,导致触觉反馈快速触发,30 秒后我在控制台中收到此警告:

enter image description here

2019-01-20 17:29:04.658240+0000 Loopover[17824:4937487] [Feedback] AVHapticPlayer async call finishWithCompletionHandler: (type=3) did not get a reply after 30 seconds (notified of 0 mediaserverd death(s) in this time)

触觉反馈是如何触发的?

我正在使用 UIImpactFeedbackGenerator 触发触觉反馈,如图所示:

UIImpactFeedbackGenerator(style: .light).impactOccurred()

这是什么意思?

我应该担心这个警告吗?如果我正常移动瓷砖,不会出现任何问题。

如果有的话,我该怎么办?

最佳答案

Is this warning something I should be worried about? What should I do, if anything?

我想没有,也没有。在 Apple 的关于 UIFeedbackGenerator 的文档中 https://developer.apple.com/documentation/uikit/uifeedbackgenerator ,他们说你应该“相信系统”。

谈论像impactOccurred()这样的方法:

Note that calling these methods does not play haptics directly. Instead, it informs the system of the event. The system then determines whether to play the haptics based on the device, the application’s state, the amount of battery power remaining, and other factors.

目前仅播放触觉反馈:

  • 在支持 Taptic Engine 的设备上

  • 当应用在前台运行时

  • 启用系统触觉设置时

关于“信任系统”:

As a general rule, trust the system to determine whether it should play feedback. Don't check the device type or app state to conditionally trigger feedback. After you’ve decided how you want to use feedback, always trigger it when the appropriate events occur. The system ignores any requests that it cannot fulfill.

希望对您有所帮助!

关于ios - AVHapticPlayer 异步调用完成 WithCompletionHandler : (type=3) did not get a reply after 30 seconds,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54279150/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com