[英]App crash even after adding NSMicrophoneUsageDescription in info.plist file swift iOS
The info.plist
file contains the following lines of code: info.plist
文件包含以下代码行:
<key>NSMicrophoneUsageDescription</key> <string>The microphone permission is needed to to receive voice commands.</string>
Still getting the following error:仍然收到以下错误:
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.
应用程序的 Info.plist 必须包含一个 NSMicrophoneUsageDescription 键和一个字符串值,向用户解释应用程序如何使用这些数据。
Any help would be greatly appreciated.任何帮助将不胜感激。 Thanks
谢谢
Double check if you have add in the correct info.plist!!仔细检查您是否添加了正确的 info.plist !!
In the first image, info.plist is used for UnitTest, And in the second image the info.plist is for the main project.在第一张图片中,info.plist 用于 UnitTest,而在第二张图片中,info.plist 用于主项目。
So just check if you've add the "NSMicrophoneUsageDescription" in the main info.plist.所以只需检查您是否在主 info.plist 中添加了“NSMicrophoneUsageDescription”。
It is obvious that if you have UnitTest you must also add the key to the other info.plist(First Image).很明显,如果您有 UnitTest,您还必须将密钥添加到另一个 info.plist(First Image)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.