This iOS dapp is an example of how to connect to Ethereum and make requests using the SDK. The example requests include:
ConnectView.swift
- Connect to the Ethereum blockchain using the SDK. The other examples are based on a successful connection as demonstrated in this example.TransactionView.swift
- Send a transaction.SignView.swift
- Sign a transaction.SwitchChainView.swift
- Switch to a different network chain (you need to call thewallet_addEthereumChain
RPC method first if it doesn't already exist in the MetaMask wallet).
To run the example dapp:
- Make sure you meet the prerequisites.
- Clone this repository.
- Change directory to
metamask-ios-sdk/Example
. - Run
pod install
. - Open
metamask-ios-sdk.xcworkspace
and run the project.