gpt4 book ai didi

ios - Cordova iOS 构建失败,带有 'edit-config' 标记

转载 作者:可可西里 更新时间:2023-11-01 04:21:50 26 4
gpt4 key购买 nike

我有一个 Ionic 3 应用程序(Ionic CLI 3.19.0、Cordova CLI 8.0.0、android 平台 7.0.0,ios 平台 4.5.4),其中包含 native “地理定位”插件。由于 iOS 10+ 需要 NSLocationWhenInUseUsageDescription App-Info.plist 文件中的属性,插件的文档 ( Geolocation iOS Quirks ) 表示在 config.xml 中包含以下内容:

<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
<string>need location access to find things nearby</string>
</edit-config>

所以我逐字添加为 <platform name="ios">...</platform> 中的第一个条目我的 config.xml 的标签。

在构建的 cordova iOS 阶段,它失败并出现以下模糊错误:

(node:60604)UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: doc.find is not a function

(node:60604) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

最佳答案

正如上面评论中提到的,需要的步骤是:

  • 删除平台 ios:cordova 平台删除 ios
  • edit-config添加到platform name="ios"标签

    <platform name="ios"> Add me here </platform>

  • 运行 prepare ios:ionic cordova prepare ios

关于ios - Cordova iOS 构建失败,带有 'edit-config' 标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48065189/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com