Skye Dunworth
Skye Dunworth

Reputation: 31

Compile error when trying to import web3swift

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:

Upvotes: 3

Views: 1015

Answers (1)

skywinder
skywinder

Reputation: 21436

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

Upvotes: 0

Related Questions