You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using RecordOnHold modifier for a SwiftSpeech button, executable console notes error: Thread 1: Fatal error: recordingSession is nil in endRecording(). Looking into it, seems like the problem is that longPress is not able to call self.startRecording and when user releases finger on the button it tries to end a recording that never started.
The text was updated successfully, but these errors were encountered:
to anyone having this issue: it seems like replacing onChanged with onEnded and reducing the minimum duration in ViewModifiers.swift fixes the issue
let longPress = LongPressGesture(minimumDuration: 0)
.onEnded { _ in
withAnimation(self.animation, self.startRecording)
self.viewComponentState = .recording
}
When using RecordOnHold modifier for a SwiftSpeech button, executable console notes error: Thread 1: Fatal error: recordingSession is nil in endRecording(). Looking into it, seems like the problem is that longPress is not able to call self.startRecording and when user releases finger on the button it tries to end a recording that never started.
The text was updated successfully, but these errors were encountered: