【问题标题】:Compile error when trying to import web3swift尝试导入 web3swift 时出现编译错误
【发布时间】:2018-09-26 07:02:24
【问题描述】:

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

没有这样的模块'web3swift'"。

导入语句如下所示:

import Geth
import web3swift

在我的 pod 文件中,我有:

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

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

  • 转到Build Settings
  • 搜索Framework Search Paths(区分大小写)
  • 双击<Multiple values>
  • 点击+
  • 添加 $(SRCROOT) 并将其设置为递归

【问题讨论】:

  • 你打开的是YourProject.xcworkspace文件还是YourProject.xcodeproj
  • 我正在打开 .xcworkspace 文件
  • 在项目导航器中选择 Pods 项目。在右侧窗格中,选择 web3swift 目标。选择构建设置。搜索产品模块名称。
  • 然后...?它选择了 web3sweift,但我是否应该更改设置,因为似乎没有设置?

标签: ios swift cocoapods web3 web3swift


【解决方案1】:

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

安装

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

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

从命令行运行pod install

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-10
    • 2012-11-23
    相关资源
    最近更新 更多