Enable dictation alert disappears quickly
When the "Enable Dictation?" alert is displayed, appDelegate.applicationWillResignActive()
is called. My guess is that in this method, you are force-ending the editing of the text input (via endEditing()
, resignFirstResponder()
, etc.) which is making the need for dictation permission no longer necessary.
Following up on @spencer602's comment: in my case, in a SwiftUI app, a `.blur()' modifier applied on a close-to-root view / root view was making the 'Enable dictation' alert disappear when tapping the microphone button on the keyboard. So I think a general recommendation for cases where the 'Enable dictation' alert disappears would be the following: check app related callbacks (willResignActive, didEnterBackground) for any first responder manipulation, if that's not the case, make sure you are not altering the view hierarchy in any way when app resigns active / goes into background.