1 year ago

#327749

test-img

esp

SwiftUI app does not run Tasks after haptics engine error

Sometimes, after the app is resumed from background it shows these messages in the log:

2022-03-23 19:16:53.423801+0000 AppName[15711:6706975] [hapi]         CHHapticEngine.mm:595   -[CHHapticEngine createHapticPlayerWithOptions:]: ERROR: Server failure: Error Domain=com.apple.CoreHaptics Code=-4810 "(null)"
2022-03-23 19:16:53.424531+0000 AppName[15711:6706975] [Feedback] failed initializing core haptics engine for <_UIFeedbackCoreHapticsEngine: 0x282e115e0>: Error Domain=com.apple.CoreHaptics Code=-4810 "(null)"

(AppName is the name of the app)

After that it fails to run code in Task - I can see in the log that the Task is called but the code in it is never executed. The app only recovers after restart.

It may be relevant that the app runs background refresh couple of times before it happens.

Thank you for any help / suggestions.

ios

swiftui

haptic-feedback

0 Answers

Your Answer

Accepted video resources