OGeek|极客世界-中国程序员成长平台

标题: ios - 尝试导入 web3swift 时出现编译错误 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 20:02
标题: ios - 尝试导入 web3swift 时出现编译错误

我正在尝试将 web3swift 导入我的 Swift 文件之一,但得到编译器错误

No such module 'web3swift'".

导入语句如下所示:

import Geth
import web3swift

在我的 pod 文件中,我有:

pod 'web3swift', :git => 'https://github.com/MercuryProtocol/web3.swift.git', :branch => 'master'

我也尝试了以下没有奏效的修复:



Best Answer-推荐答案


根据您的问题 - 可能您正在使用另一个 repo。请检查实际版本 0.7.0

安装

web3swift 可通过 CocoaPods 获得.安装 它,只需将以下行添加到您的 Podfile 中:

pod 'web3swift',git:'https://github.com/matterinc/web3swift'

从命令行运行 pod install

之后它应该可以正常工作。 如果您仍然有问题,请随时打开问题: https://github.com/matterinc/web3swift/issues

关于ios - 尝试导入 web3swift 时出现编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49859007/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4