Getting Started

Requirements

  • Swift v5.3+

  • iOS 13+ (2019)

Install

// Package.swift
dependencies: [
    .package(url: "https://github.com/Blade-Labs/swift-blade.git", from: "0.6.36")
]
pod 'SwiftBlade', :git => 'git@github.com:Blade-Labs/swift-blade.git', :tag => '0.6.36'

Note: See "Adding Package Dependencies to Your App" for help on adding a swift package to your project.

Usage

During initialization, Swift Blade will fetch all required data from Blade servers, and will initialize the webView with all required data, including visitorId.

import SwiftBlade

SwiftBlade.shared.initialize(apiKey: "API_KEY", dAppCode: "dAppCode", network: .TESTNET, bladeEnv: .Prod) { (result, error) in
    print("init complete")
    print(result ?? error)
}

// Get balance by hedera id
SwiftBlade.shared.getBalance(addressTextField.text!) { (result, error) in
  print(result)
}

Last updated