Practical overview
When it fits
Use it when a Swift application needs Ethereum connectivity and its developers want library-level APIs for queries, contract interactions or token data.
Who it is for
- Swift developers building Ethereum features into iOS or macOS applications.
- Teams implementing contract calls, token data access or Ethereum account interactions in Swift.
Documented uses
- Query Ethereum through an HTTP or WebSocket RPC client, including retrieving gas prices.
- Encode smart-contract functions using Swift types and submit transactions.
- Retrieve ERC-20 and ERC-721 token information, balances and transfer events.
- Build app features involving ENS or use the library's ZKSync Era helpers.
Requirements & limits
The project is open source under the MIT license. Swift Package Manager is the documented installation method; CocoaPods is no longer supported.
- An Ethereum HTTP or WebSocket RPC endpoint is required to create a client.
- Account-backed transaction signing uses a key-storage provider; the maintainers recommend implementing a production provider rather than relying on the included local-storage example.
- The README says ABI code generation is not supported, so contract functions must be represented using the library's ABI interfaces or another tool.
- ERC-721 metadata decoding targets standard JSON, while the README notes that some contracts may not fully comply with the standard.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add Web3.Swift with Swift Package Manager
Add the library dependency to an Xcode project or Swift package.
Before you start
- An Xcode project or Package.swift file.
Steps
In Xcode, use File → Swift Packages to add the package, or edit Package.swift.
For Package.swift, add .package(url: "https://github.com/argentlabs/web3.swift", from: "1.1.0").
Expected outcome
The project manifest or Xcode project includes Web3.Swift as a dependency.
Guide limitations
- CocoaPods is no longer supported; the README recommends Swift Package Manager.
- Adding the dependency does not configure an Ethereum RPC connection or account.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 9 October 2026
- Original website title
- argentlabs/web3.swift · Official homepage title · retained in its source language

