Since the iOS 7 update, there have been some changes to the recording apps. I have an application that was used to work with iOS 5 and 6, but when I tried to run it on iOS 7, the recording did not respond.
I checked the Internet and saw a new method there that needs to be called. I tried putting this code in viewDidAppear:
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { if([[AVAudioSession sharedInstance] respondsToSelector:@selector(requestRecordPermission:)]) { [[AVAudioSession sharedInstance] requestRecordPermission:^(BOOL granted) { NSLog(@"permission : %d", granted); }]; } }
'given' is always 1, although I did not grant any permissions and did not see the request popup.
Btw I'm trying to handle this using xcode 4.6.3. I made a category for AVAudioSession with the requestRecordPermission method, since this method is only available in iOS 7.
Thank.
ios ios7 record permissions avaudiosession
Kevin Hury Sep 23 '13 at 11:03 2013-09-23 11:03
source share