Closed nacho4d closed 8 years ago
Yes, this is right, and we need to find a proper way to produce an error. Additionally, I'm looking into iOS 6 compatibility issues, so this validation would be nicer:
if([[AVAudioSession sharedInstance] respondsToSelector:@selector(requestRecordPermission:)]) {
[[AVAudioSession sharedInstance] requestRecordPermission:^(BOOL granted) {
if (granted) {
// Permission granted
} else {
// Permission denied
}
}];
}
Since above changes were in a PR that was closed I have made another PR.
I merged the PR, closing this.
The first time
recognize:
method is called, iOS will request microphone access to the user: "My App" Would like to Access the Microphone. [Don't Allow] [Allow] . If the user presses Don't Allow this SDK does not return an error to the host application.The socket connection is already stablished, hence it depends on the "inactivity_timeout" parameter to fail.
The bug can be easily reproduced by resetting the settings:
General > Reset > Reset Location & Privacy
I suspect something like below is needed before starting the connection:
http://stackoverflow.com/questions/24981333/ios-check-if-application-has-access-to-microphone