The OmiseGO iOS SDK allows developers to easily interact with the OmiseGO eWallet. This SDK is split into 3 Cocoapods subspecs: Core, Client and Admin. The Core is a common dependency that contains the shared logic. The Client and Admin modules contain specific logic to respectively access the client or admin API.
- iOS 10.0+
- Xcode 10+
- Swift 4.2
This version of the SDK is compatible with the version 1.1.0
of the eWallet.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
gem install cocoapods
If you are using Cocoapods to integrate the SDK, you can take advantage of the subspecs that allows the integration of specific parts of the SDK separately.
If you only need to integrate and support the Client
API then you can add only the Client
subscpec by adding the following line in your Podfile
:
pod 'OmiseGO/Client'
Or if you only want to support the Admin
API, you can use:
pod 'OmiseGO/Admin'
Or if you need both simply use:
pod 'OmiseGO'
Alternatively you can also specify a version ([read more about the Podfile] (https://guides.cocoapods.org/using/the-podfile.html)):
pod 'OmiseGO', '~> 1.0'
Then, run the following command:
$ pod install
Carthage is a simple, decentralized dependency manager for Cocoa.
brew install carthage
To integrate the omisego
SDK into your Xcode project using Carthage, add the following line in your Cartfile
:
github "omisego/ios-sdk"
Then, run the following command:
carthage update --platform ios
Drag the built OmiseGO.framework
into your Xcode project.
In order to run the live tests (bound to a working server) you need to fill the corresponding variables in the plist file secret.plist
.
Note: Alternatively, these keys can be provided with environment variables, making it easier and safer for CI to run since you don't need to keep them in the source code.
The variables are:
OMG_BASE_URL
OMG_WEBSOCKET_URL
OMG_API_KEY
OMG_AUTHENTICATION_TOKEN
OMG_TOKEN_ID
You can then for example run the tests with the following command:
xcodebuild -workspace "OmiseGO.xcworkspace" -scheme "OmiseGO" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 8' OMG_BASE_URL="https://your.base.server.url" OMG_API_KEY="yourAPIKey" OMG_AUTHENTICATION_TOKEN="yourTestAuthenticationToken" OMG_TOKEN_ID="aTokenId" OMG_WEBSOCKET_URL="wss://your.base.socket.url" test
There are two dependencies required to run the SDK.
- Starscream to manage websockets
- BigInt to manage big numbers
See how you can help.
The OmiseGO iOS SDK is released under the Apache License.