Latest 1.2.0.beta.2
Homepage https://github.com/omisego/ios-sdk
License Apache
Platforms ios 10.0
Authors

Build Status
CocoaPods Compatible
Carthage Compatible
Platform
Twitter

OmiseGO iOS SDK

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.


Table of Contents


Requirements

  • iOS 10.0+
  • Xcode 10+
  • Swift 4.2

This version of the SDK is compatible with the version 1.1.0 of the eWallet.


Installation

CocoaPods

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

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.


Usage

Client API usage

Admin API usage

Pagination and filtering

Tests

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


Dependencies

There are two dependencies required to run the SDK.


Contributing

See how you can help.


License

The OmiseGO iOS SDK is released under the Apache License.

Latest podspec

{
    "name": "OmiseGO",
    "version": "1.2.0.beta.2",
    "license": "Apache",
    "summary": "The OmiseGO iOS SDK allows developers to easily interact with a node of the OmiseGO eWallet.",
    "homepage": "https://github.com/omisego/ios-sdk",
    "social_media_url": "https://twitter.com/omise_go",
    "authors": {
        "OmiseGO team": "[email protected]"
    },
    "source": {
        "git": "https://github.com/omisego/ios-sdk.git",
        "tag": "1.2.0.beta.2"
    },
    "platforms": {
        "ios": "10.0"
    },
    "swift_version": "5.0",
    "subspecs": [
        {
            "name": "Core",
            "source_files": "Source/Core/**/*.swift",
            "dependencies": {
                "Starscream": [
                    "~> 3.1"
                ],
                "BigInt": [
                    "~> 4.0"
                ]
            }
        },
        {
            "name": "Client",
            "source_files": "Source/Client/**/*.swift",
            "dependencies": {
                "OmiseGO/Core": []
            }
        },
        {
            "name": "Admin",
            "source_files": "Source/Admin/**/*.swift",
            "dependencies": {
                "OmiseGO/Core": []
            }
        }
    ]
}

Pin It on Pinterest

Share This