3

I am trying to import web3swift into one of my Swift files, but get the compiler error

No such module 'web3swift'".

The import statements look like this:

import Geth
import web3swift

In my pod file, I have:

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

I have also tried the following fix which hasn't worked:

  • Go to Build Settings
  • Search Framework Search Paths (case sensitive)
  • Double click on <Multiple values>
  • Click the +
  • Add $(SRCROOT) and set it to recursive
TylerH
  • 20,799
  • 66
  • 75
  • 101

1 Answers1

0

According to your question, you are probably using another repo. Please check that your actual version is 0.7.0.

Installation

web3swift is available through CocoaPods. To install it, simply add the following line to your Podfile:

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

Run pod install from the command line

It should work fine after that. If you still have problems, feel free to open an issue: https://github.com/matterinc/web3swift/issues

TylerH
  • 20,799
  • 66
  • 75
  • 101
skywinder
  • 21,291
  • 15
  • 93
  • 123