WalletConnector creates a connection to an Ethereum wallet. It also provides a UI component for choosing different wallets to connect with.
- iOS 14.0+
- Xcode 12.1
You can use SPM to install WalletConnector
by adding the package to your XCode project.
import WalletConnector
let connector = WalletConnector(
appName: "Your app",
appDescription: "Your app description",
url: URL(string: "https://your-app.org")!
)
try? connector.connect()
connector.deeplinkURL(fromBaseURL: "metamask:")
if let url = URL(string: urlString), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
You can also WalletConnectorViewController
to show a modal of wallets to connect your app to. You will also have to add all supported wallet deeplinks to your Info.plist.