美文网首页iOS
iOS开发之权限crash问题

iOS开发之权限crash问题

作者: Gary_Kwok | 来源:发表于2017-01-13 02:48 被阅读0次

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

    相关文章

      网友评论

        本文标题:iOS开发之权限crash问题

        本文链接:https://www.haomeiwen.com/subject/saijbttx.html