masaldana2
masaldana2

Reputation: 654

requestRecordPermission not working in ios10 xcode 8 beta 3

when I try to request permission to record with the mic it throws " [access] < private>"

AVAudioSession.sharedInstance().requestRecordPermission({(granted: Bool)-> Void in
        if granted {

            print("yass")
        } else {
            print("Permission to record not granted")
        }
    })

Anybody got a workaround? This works with 7.3 tho

Upvotes: 2

Views: 9062

Answers (1)

Justin Warmkessel
Justin Warmkessel

Reputation: 116

If the output log looks like this:

2016-07-08 16:41:11.268943 project-name[362:56625] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2016-07-08 16:41:11.272276 project-name[362:56625] [MC] Reading from public effective user settings.
2016-07-08 16:41:11.356590 project-name[362:56700] [access] <private>

You might be missing permissions for camera usage.

The solution is to add the "Privacy - Camera Usage Description" key to your Info.plist.

Picture of my plist that works

Here's a link to an Apple Developer Forum discussion explaining why this occurs.

Upvotes: 10

Related Questions