VaultMobileSDK  18R2
iOS framework for Vault API
VaultMobileSDK for iOS

Introduction

VaultMobileSDK is an iOS framework that simplifies connecting and interacting with Vault from an iOS application. It provides support for authorization, secure local storage for your application's documents, support for uploading those documents to Vault, and a client-side passcode lock screen.

Quick Start

Integrating VaultMobileSDK

First, pull the VaultMobileSDK framework into your project by following Apple's instructions for embedding a framework in iOS Apps.

Next, import the framework in your application's UIApplicationDelegate class:

import VaultMobileSDK

Next, modify your application's UIApplicationDelegate by adding the following line somewhere in your application:didFinishLaunchingWithOptions: method:

VEVSDKApplicationDelegate.sharedInstance().application(app, didFinishLaunchingWithOptions: launchOptions)

Authentication

Next, find a place in your code that's convenient to run Vault authentication and then add import VaultMobileSDK as above. Then simply include the following call:

VEVVaultAuth.sharedInstance().authenticate{ (_, error) in
    if let error = error as NSError?  {
        print("Error authenticating user:\(error)")
    } else {
        print("User authenticated")
    }
 }

When you run your app and execute the code above you will be prompted for your Vault login credentials. Once authenticated, you will then be prompted to set a PIN code for the app. You will see the output from the callbacks in XCode's console when the SDK returns control back to your application.