简体   繁体   English

即使在 info.plist 文件 swift iOS 中添加 NSMicrophoneUsageDescription 后,应用程序也会崩溃

[英]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)。

此 info.plist 用于 UnitTest

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS 12-“应用程序的Info.plist必须包含NSMicrophoneUsageDescription密钥” - iOS 12 - “The app's Info.plist must contain an NSMicrophoneUsageDescription key” Xamarin.Forms iOS storyboard文件未显示。 - Xamarin.Forms iOS storyboard not showing, even after being built and set in the Info.plist file iOS应用无法读取info.plist - iOS app cannot read info.plist iOS - 获取Info.plist文件 - iOS - Get Info.plist file 迅速将UIImagePickerController呈现给照片库后崩溃4; 隐私已添加到info.plist - Crash after having presented UIImagePickerController to photo Library in swift 4 ; Privacy was added to info.plist 应用程序的 Info.plist 必须包含一个 NSMicrophoneUsageDescription 键和一个字符串值,向用户解释应用程序如何使用此数据 - The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data 如何国际化iOS公共plist资源文件而不是“ info.plist”? - How to internationalize iOS common plist resource file not “info.plist”? 即使我在 info.plist 中添加了 NSCameraUsageDescription,应用程序也会崩溃,使用 iOS 10、Xcode 8 - App crashes even though I added NSCameraUsageDescription in info.plist, using iOS 10, Xcode 8 带有地理位置网站的 Flutter iOS webview 应用程序不会请求位置权限,即使 info.plist 已调整 - Flutter iOS webview app with Geolocation website doesn't Ask For Location Permission even info.plist is adjusted 什么是“应用程序的Info.plist必须包含NSPhotoLibraryAddUsageDescription”的崩溃? - What is the crash of “The app's Info.plist must contain an NSPhotoLibraryAddUsageDescription”?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM