异常'NSInvalidArgumentException'NSHealthUpdateUsageDescritption

编程入门 行业动态 更新时间:2024-10-22 18:46:09
本文介绍了异常'NSInvalidArgumentException'NSHealthUpdateUsageDescritption的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

由于未捕获的异常"NSInvalidArgumentException"而终止应用程序,原因:必须在应用程序的Info.plist中设置NSHealthUpdateUsageDescription才能请求写授权."

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSHealthUpdateUsageDescription must be set in the app's Info.plist in order to request write authorization.'

Info.plist具有此条目

Info.plist has this entry

<key>NSHealthShareUsageDescription</key> <string>some string value stating the reason</string>

推荐答案

如果您已经添加了 NSHealthShareUsageDescription ,但仍收到异常.

If you already added NSHealthShareUsageDescription but still get the exception.

可能是因为说明太简短.

确保所有语言环境的说明都超过12个字符.

Make sure the description is longer than 12 characters for all locales.

例如

HelloHello->崩溃!

HelloHello -> Crash!!

HelloHelloHi->确定

HelloHelloHi -> OK

更多推荐

异常'NSInvalidArgumentException'NSHealthUpdateUsageDescritption

本文发布于:2023-11-26 17:15:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634482.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:异常   NSHealthUpdateUsageDescritption   NSInvalidArgumentException

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!