Mozo protocol toolkit for Swift


Keywords
ios, ios-sdk, mozo, mozo-sdk, swift
License
MIT
Install
pod try MozoSDK

Documentation

Mozo SDK for iOS

Badge w/ Version Swift version iOS version

MozoSDK for iOS by MozoX Pte. Ltd. For more information please see the website.

Install

Using CocoaPods

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
use_frameworks!

target 'MyApp' do
  pod 'MozoSDK'
end

Requirements

With iOS 10 and higher you need to add some keys to the Info.plist of your project. This should be found in 'your_project/ios/your_project/Info.plist'.

  1. The "Privacy - Camera Usage Description" key. Add the following code:
<key>NSCameraUsageDescription</key>
<string>To scan QR Codes and detect your face.</string>
  1. The "Privacy - Location Always Usage Description" key.
<key>NSLocationAlwaysUsageDescription</key>
<string>To assist you in finding Mozo Tokens.</string>
  1. The "Privacy - Bluetooth Peripheral Usage Description" key.
<key>NSBluetoothPeripheralUsageDescription</key>
<string>To enable you to receive Mozo Tokens.</string>

Getting Started with Swift

  1. Import the MozoSDK header in the application delegate.
import MozoSDK
  1. Create a default service configuration by adding the following code snippet in the application:didFinishLaunchingWithOptions: application delegate method.
MozoSDK.configure()

or you can create a specific configuration for your company through registered api key:

MozoSDK.configure(apiKey: "YOUR API KEY")

and your target network:

MozoSDK.configure(apiKey: "YOUR API KEY", network: NetworkType.MainNet)
  1. In Swift file you want to use the SDK, import the MozoSDK headers for the services you are using. The header file import convention is import MozoSDK, as in the following examples:
import MozoSDK
  1. Request MozoSDK for authentication:
MozoSDK.authenticate()
  1. Request MozoSDK for transfer:
MozoSDK.transferMozo()
  1. Request MozoSDK for transaction history:
MozoSDK.displayTransactionHistory()

Getting Started with Objective-C

  1. Import the MozoSDK header in the application delegate.
@import MozoSDK;
  1. Create a default service configuration by adding the following code snippet in the application:didFinishLaunchingWithOptions: application delegate method.
[MozoSDK configure];
  1. Import the MozoSDK headers for the services you are using. The header file import convention is @import MozoSDK;, as in the following examples:
@import MozoSDK;

FEATURES

GIVE FEEDBACK

To report a specific problem or feature request, open a new issue on Github. For questions, suggestions, or anything else, email to developer@mozocoin.io, or join our Slack channel.

LICENSE

See the LICENSE file.