Here is elegant web3js functionality in Swift. Native ABI parsing and smart contract interactions
Here is an example, to send transaction:
TransactionsService().prepareTransactionForSendingEther(destinationAddressString: destinationAddress, amountString: amount, gasLimit: 21000) { (result) in
switch result {
case .Success(let transaction):
guard let gasPrice = self.gasPriceTextField.text else { return }
guard let gasLimit = self.gasLimitTextField.text else { return }
guard let name = self.walletName else { return }
let dict:[String:Any] = [
"gasPrice":gasPrice,
"gasLimit":gasLimit,
"transaction":transaction,
"amount":amount,
"name": name,
"fromAddress": self.walletAddress!,
"toAddress": destinationAddress]
self.sendFunds(dict: dict, enteredPassword: withPassword)
case .Error(let error):
var textToSend = ""
if let error = error as? SendErrors {
switch error {
case .invalidDestinationAddress:
textToSend = "invalidAddress"
default:
break
}
}
showErrorAlert(for: self, error: error)
}
}
For Android you can use web3j/web3j