微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用 Nativescript 在 iOS 上准备期间出现多个依赖项错误 Podfile

如何解决使用 Nativescript 在 iOS 上准备期间出现多个依赖项错误 Podfile

我从事 Android 和 IOS 的 Nativescript 项目。我想使用这个插件Socket.IO-Client-Swift。我执行这个 ns plugin add @triniwiz/nativescript-socketio 。 "@triniwiz/nativescript-socketio" 在 4.0.2 版本安装良好

我的应用程序在 android 上构建时没有错误。但是,当我想使用此命令 ns prepare ios --release 为 iOS 准备构建时,出现此错误

...
Webpack compilation complete.
nativescript-plugin-firebase: /Users/technique/Documents/DEV/mloa-app-native/platforms/ios/.pluginfirebaseinfo not found,forcing prepare!
nativescript-plugin-firebase: running release build or change in environment detected,forcing prepare!
Installing pods...
Analyzing dependencies
Pre-downloading: `Socket.IO-Client-Swift` from `https://github.com/triniwiz/socket.io-client-swift.git`
Pre-downloading: `Toast-Swift` from `https://github.com/triniwiz/Toast-Swift.git`
[!] There are multiple dependencies with different sources for `Socket.IO-Client-Swift` in `Podfile`:

- Socket.IO-Client-Swift (from `https://github.com/triniwiz/socket.io-client-swift.git`,branch `15.1.0`)
- Socket.IO-Client-Swift (from `https://github.com/triniwiz/socket.io-client-swift.git`)
'pod install' command Failed.

如果我检查生成的 Podfile,有效地,有两行是为 Socket.IO-Client-Swift 生成的,但是如果我删除其中之一并使用 pod updatepod install --repo-update 或 { {1}},没有错误。所以我重试pod repo update,但它不起作用,该行重新出现...

(我也尝试过“@triniwiz/nativescript-socketio”的 4.0.1 版)

那么我该怎么做才能避免这种情况?

谢谢

我的环境
本机脚本:8.0.1
吊舱:1.10.1
MacBook Pro(13 英寸,M1,2020)
VSCode
所有命令都在rosetta-terminal中使用

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。