Tuesday, January 16, 2024
HomeiOS Developmentios - CoreHaptics on Swift error _Haptic_Check: -

ios – CoreHaptics on Swift error _Haptic_Check: -[CHHapticEngine(CHHapticEngineInternal) checkEngineStateOnStart:]


I’ve been making an attempt to create customized vibrations for my app utilizing CoreHaptics on a brand new SwiftUI app. To make my code neat, I separated the perform that creates and begins the CHHapticEngine from the perform that runs the haptic sample like so:

static func StartEngine() throws {
   //...
    do
    {
        var engine = strive? CHHapticEngine()
            
        strive engine?.begin()
    }
   //...
}

static func RunWithPattern(sample: CHHapticPattern) throws {
    //...
    do
    {
        var engine = strive CHHapticEngine()
        let participant = strive engine.makePlayer(with: sample)
        strive participant.begin(atTime: 0)
    } 
    //...
}

Operating this offers me this error within the console, and no haptics felt on the machine: HapticUtils.h:59 _Haptic_Check: -[CHHapticEngine(CHHapticEngineInternal) checkEngineStateOnStart:]: self.working error -4805.

I received 0 hits on google, even when utilizing generic components of that error message, therefore asking the query right here.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments