Skip to main content

Mobile WebWallet SDK - iOS

Docs for the Android WebWallet SDK are here.

This is a lightweight, fully native SDK that allows a host app to perform web wallet authentication functionality in a in-app browser. It works with both UIKit and SwiftUI native apps.

Before you begin: You need to be registered as Unum ID customer to use this SDK.

note

An example project using this SDK can be found here. This serves as a useful technical reference.

Overview

Minimum Requirements

  • iOS 13.0 and above

Integration Instructions

Add the SDK to your project Cocoapods - Add the SDK to your Podfile and run pod install

source 'https://github.com/CocoaPods/Specs.git'

target 'YourApp' do
use_frameworks!

pod 'UnumIDWebWallet'
end

Then to import the framework, all you have to do is:

import UnumIDWebWallet

Performing User DID Association

More details on the

A DID (or decentralized identifier) identifies a participant in the Unum ID ecosystem. A participant is an issuer, subject, or verifier.
Example: ACME Bank is identified by two DIDs, one for acting as an issuer and another for acting as a verifier. Richard, an ACME subject (user), is identified by one DID. Hooli FinTech, which acts as a verifier, is identified by one DID.
Components: The Server SDK returns DIDs for issuers and verifiers, and the Mobile SDK returns DIDs for subjects.
DID (did) association process can be found here.

When a host application would like to link a user with existing

A credential is a collection of data about a person. It's issued by a company (i.e. created and sent to a user) and stored in the company's app, on that user's device.
Example: ACME Bank issues a KYC verification credential to Richard (an ACME user). This includes Richard's contact information and account numbers, as well as a level of confidence in the accuracy of the data.
Components: A company issues credentials using the Server SDK, and an app stores credentials using the Mobile SDK.
credentials, the user
A DID (or decentralized identifier) identifies a participant in the Unum ID ecosystem. A participant is an issuer, subject, or verifier.
Example: ACME Bank is identified by two DIDs, one for acting as an issuer and another for acting as a verifier. Richard, an ACME subject (user), is identified by one DID. Hooli FinTech, which acts as a verifier, is identified by one DID.
Components: The Server SDK returns DIDs for issuers and verifiers, and the Mobile SDK returns DIDs for subjects.
DID (did) association flow can be kicked off. This will require the userCode and the
An issuer is a role a company can play to issue credentials to subjects (users). An issuer also change credential statuses, for example to revoke credentials.
Example: ACME Bank issues a KYC verification credential to Richard (an ACME user). It later revokes that credential and issues a new one to Richard to update his information.
Components: An issuer issues credentials and changes credential statuses using the Server SDK.
issuer
A DID (or decentralized identifier) identifies a participant in the Unum ID ecosystem. A participant is an issuer, subject, or verifier.
Example: ACME Bank is identified by two DIDs, one for acting as an issuer and another for acting as a verifier. Richard, an ACME subject (user), is identified by one DID. Hooli FinTech, which acts as a verifier, is identified by one DID.
Components: The Server SDK returns DIDs for issuers and verifiers, and the Mobile SDK returns DIDs for subjects.
DID (did) to be passed. An optional value for the user email can be passed to help prefill data. An optional value of a color can also be passed to help match the color of title bar with the app appearance.

/**
Function for launching the web wallet and performing the user DID association flow.

- parameter viewController UIViewController A provided view controller to launch the Web Wallet controller.
- parameter parameters: Parameters Values used to setup the presentation.
- parameter barTintColor: UIColor An optional value to set the color of the navigation bar.
- parameter controlTintColor: UIColor An optional value to set the tint color of the controls.
- parameter completion: (() -> Void)? An option completion when the presentation is finished.
*/
public static func associate(
on viewController: UIViewController,
with parameters: Parameters,
barTintColor: UIColor? = nil,
controlTintColor: UIColor? = nil,
completion: (() -> Void)? = nil
)

Opening a web wallet web auth window

If the host app already has the full url required for showing the web wallet, the url can be passed to the WebWallet SDK to open the web wallet. An optional value of a color can also be passed to help match the color of title bar with the app theme.

/**
Function for launching a provided url in-app browser.

- parameter url: URL The url to be launched.
- parameter viewController: UIViewController A provided view controller to launch the Web Wallet controller.
- parameter barTintColor: UIColor An optional value to set the color of the navigation bar.
- parameter controlTintColor: UIColor An optional value to set the tint color of the controls.
- parameter completion: (() -> Void)? An option completion when the presentation is finished.
*/
public static func launch(
url: URL,
on viewController: UIViewController,
barTintColor: UIColor? = nil,
controlTintColor: UIColor? = nil,
completion: (() -> Void)? = nil
)