iOS

iOS开发之权限crash问题

2017-01-13  本文已影响0人  Gary_Kwok

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文件里面添加相应的权限描述就可以了。

上一篇下一篇

猜你喜欢

热点阅读