在基于 iOS cordova 的应用程序中,应用程序崩溃并在控制台中出现以下错误
断言失败 -[CDVConfigParser parser:parseErrorOccurred:],/Users/platforms/ios/CordovaLib/Classes/CDVConfigParser.m:85
由于未捕获的异常 'NSInternalInconsistencyException' 而终止应用程序,原因:'config.xml 解析错误行 41 col 47'
In line 41 : I have below line in config.xml
<gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription" overwrite="false">
它仅在 iOS 6.X.X 版本上崩溃,但在 iOS 8.0 及以上版本上运行良好
我是 cordova 插件的新手。任何人都请帮我解决这个崩溃问题
最佳答案
NSLocationAlwaysUsageDescription 用于访问用户的位置信息,iOS 8及以上版本可用..
应用程序由于在 config.xml 中使用 NSLocationAlwaysUsageDescription 而崩溃
相反,您可以在 info.plist 中使用 NSLocationAlwaysUsageDescription 值,如果您在 config.xml 中使用过,则删除下面的行
<gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription" overwrite="false">
<array>
<string>NSLocationAlwaysUsageDescription</string>
</array>
更多信息:Refer this
关于ios - 应用程序崩溃并显示 <gap :config-file platform ="ios" parent ="NSLocationAlwaysUsageDescription" overwrite ="false"> in config. xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31284148/