1

经过一天的使用CHHapticEngine和自定义触觉模式,特别是使用 AHAP 文件(包括添加声音样本),我失去了 deivce / iPhone 中的声音和触觉。iPhone 恢复出厂设置后,设备中仍然没有触觉/声音(没有铃声、没有振动等)。当尝试启动触觉引擎并播放任何模式时,我可以在 Xcode 调试器中看到以下输出:

2020-04-29 19:44:31.034051+0200 ProjectName[18431:5043001] [hapi] CHHapticEngine.mm:2354:-[CHHapticEngine doStartWithCompletionHandler:]_block_invoke: ERROR: Player start failed: The operation couldn’t be completed. (com.apple.CoreHaptics error 1852797029.)
2020-04-29 19:44:31.034398+0200 ProjectName[18431:5042880] [Feedback] failed to start core haptics engine for <_UIFeedbackCoreHapticsEngine: 0x28268f170>: Error Domain=com.apple.CoreHaptics Code=1852797029 "(null)"
2020-04-29 19:44:34.076491+0200 ProjectName[18431:5043124] [hapi] CHHapticEngine.mm:2354:-[CHHapticEngine doStartWithCompletionHandler:]_block_invoke: ERROR: Player start failed: The operation couldn’t be completed. (com.apple.CoreHaptics error 1852797029.)
2020-04-29 19:44:34.076703+0200 ProjectName[18431:5043124] [hapi] HapticUtils.h:56:_Haptic_Check: -[CHHapticEngine checkEngineState:]: self.running error -4805
2020-04-29 19:44:34.077641+0200 ProjectName[18431:5043124] error = Error Domain=com.apple.CoreHaptics Code=-4805 "(null)" UserInfo={Error =self.running}

问题是,代码是否可能损坏硬件?

4

0 回答 0