早上用新pad调试时,录音直接崩溃了,并报如下错误:
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.
大概意思是访问隐私数据需要在plist文件包含一个NSMicrophoneUsageDescription关键字符串值。测试了一下老pad,并无问题,所以判断应该是iOS 10系统新添加的安全认证。
所以找到Info.plist文件,添加如下语句:(Privacy - Microphone Usage Description)