在中使用edit-config标记时config.xml,我在构建时遇到此错误:
Error: doc.find is not a function
有任何想法吗?
Answers:
我认为platforms/ios/ios.json文件与冲突时抛出了错误config.xml。
要解决此问题,请删除*-Info.plist密钥及其值,platforms/ios/ios.json然后cordova prepare ios再次执行。
-增加17 / May / 2020-
如果某些插件的config-file标签为*-Info.plistconfig.xml的edit-config标签为*-Info.plist,则可能会发生此错误。在这种情况下,删除platforms/*和plugins/*,然后
cordova platform add ios和cordova prepare试。(如果你cordova prepare没有cordova platform add ios,这个错误可能发生)
"NSPhotoLibraryUsageDescription": [ { "xml": "<string>Need photo library access to get pictures from there.</string>", "count": 1, "mode": "merge", "id": "config.xml" } ],
从Cordova 7.1.0开始,<edit-config>存在一个与文件中platforms/ios/ios.json何时*-Info.plist填充有冲突的问题json
我已改用<config-file>来解决此问题。
解:
<config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
<string>need location access to find things nearby</string>
</config-file>
NSLocationAlwaysUsageDescription,这解决了我的问题,很多!