iOS开发之权限crash问题

iOS10在使用语音讲话的时候发生了crash,报以下错误

[access] 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.

这是因为在iOS10之后,我们在使用系统的功能时必须要添加权限描述,否则就会出现crash。

解决方法:

如图所示,在info.plist文件里面添加相应的权限描述就可以了。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容