Skip to content

This SDK for iOS contains the most up-to-date frameworks for integrating Mobile Key technology into your own iOS applications.

License

Notifications You must be signed in to change notification settings

officernd/ClaySDK

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClaySDK

Carthage compatible CocoaPods compatible License: MIT

By Salto KS.

Move to Gitlab

This repository is deprecated. Distribution of ClaySDK moved to Gitlab and requires authentication. Please contact SaltoKS support for more information on how to migrate.

Introduction

This SDK for iOS contains the most up-to-date frameworks for integrating Mobile Key technology into your own iOS applications. It will setup the necessary security to communicate with Connect API, and unlock locks with encrypted Mobile Keys returned by the Connect API. The SDK for iOS includes iOS libraries, developer documentation and a sample Xcode project to get you up and running quickly and easily.

Requirements

  • iOS 11+

Apart from that, these frameworks must be included into the target project:

  • SaltoJustINMobileSDK.xcframework
  • CoreBluetooth.framework
  • Foundation.framework
  • VirgilSDK
  • VirgilCrypto
  • VirgilCryptoFoundation
  • VSCCommon
  • VSCFoundation

Installation

First, you need to obtain a copy of the JustInMobile iOS SDK from Salto Systems. Once you have this copy, you can start using the SDK.

The Virgil libraries can be found at Virgil Security Objective-C/Swift SDK

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

To install ClaySDK, simply add the following line to your Podfile:

pod 'ClaySDK', '~> 1.10'

Usage

import ClaySDK
//...
//'self' must conform to ClayDelegate, the apiKey will be provided to you
let clay = ClaySDK(installationUID: "SOME_UNIQUE_ID", apiKey: "THE_API_PUBLIC_KEY", delegate: self)
//...
// Public key that you need to send via API to activate mobile key
let publicKey = clay.getPublicKey()
//...
//'yourOpenDoorDelegate' must conform to OpenDoorDelegate
clay.openDoor(with: "your-encrypted-key", delegate: yourOpenDoorDelegate)

Inside OpenDoorDelegate implementation ClayResult can be handled

import SaltoJustINMobileSDK
//...
func didOpen(with result: ClayResult?) {
    guard let result = result else { return }
    // by using SSOperationGrup
    let group = SSOpResult.getGroup(result.getOpResult())
    switch group {
    case .groupAccepted: 
        // key sucessfully sent to lock (we don't know if user have access, access is indicated by light of the lock)
        break
    case .groupFailure, .groupRejected, .groupUnknownResult:
        // there was a problem with sending key to the lock
        break
    default:
        break
    }
}

Author

Changelog

See CHANGELOG.

About

This SDK for iOS contains the most up-to-date frameworks for integrating Mobile Key technology into your own iOS applications.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 98.8%
  • Ruby 1.2%