我正在创建需要将钱包与 WalletConnect 连接的 Dapp
let connectionUrl = walletConnect.connect()
/// https://docs.walletconnect.org/mobile-linking#for-ios
/// **NOTE**: Majority of wallets support universal links that you should normally use in production application
/// Here deep link provided for integration with server test app only
let deepLinkUrl = "wc://wc?uri=\(connectionUrl)"
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
if let url = URL(string: deepLinkUrl), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
} else {
self.handshakeController = HandshakeViewController.create(code: connectionUrl)
self.present(self.handshakeController, animated: true)
}
}
生成二维码时与钱包连接,用钱包应用程序扫描,但我们可以检查已安装的钱包直接打开吗?