Our framework is written in Swift 4 and is designed to work with the blockchain Cyber
- 📱 iOS 10.0+
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them
Give examples
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate Alamofire into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'CyberSwift', :git => "https://github.com/GolosChain/cyberSwift.git"
end
Then, run the following command in Terminal
:
$ pod update 'CyberSwift'
For start use framework in top of any files add next code:
import CyberSwift
In top of AppDelegate.swift file create a global constant for the instance of the class Broadcast:
let broadcast: Broadcast = Broadcast.shared
// Create MethodAPIType
let methodAPIType = MethodAPIType.getAccounts(names: ["inertia"])
// API 'get_accounts'
broadcast.executeGET(byMethodAPIType: methodAPIType,
onResult: { [weak self] result in
Logger.log(message: "\nresponse Result = \(result)\n", event: .debug)
},
onError: { [weak self] errorAPI in
Logger.log(message: "nresponse ErrorAPI = \(errorAPI.caseInfo.message)\n", event: .error)
})
// Create OperationType
let operationType: OperationAPIType = OperationAPIType.vote(fields: (voter: voter, author: author, permlink: permlink, weight: weight))
// POST Request
broadcast.executePOST(byOperationAPIType: operationType,
onResult: { [weak self] result in
Logger.log(message: "\nresponse Result = \(result)\n", event: .debug)
},
onError: { [weak self] errorAPI in
Logger.log(message: "nresponse ErrorAPI = \(errorAPI.caseInfo.message)\n", event: .error)
})
Simple, pretty and powerful logger for android
Initialize:
Logger.log(message: "\nresponse Result = \(result)\n", event: .debug)
Explain how to run the automated tests for this system
Explain what these tests test and why
Give an example
Explain what these tests test and why
Give an example
Add additional notes about how to deploy this on a live system
- Starscream - Websockets in Swift for iOS and OSX
- Localize-Swift - Swift friendly localization and i18n with in-app language switching
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
For the versions available, see the tags on this repository.
- Monastyrskyi Sergey - Initial work - Monserg
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone who's code was used
- Inspiration
- etc