Documentation
  • Overview
  • Usage Guidelines
  • iOS SDK Integration Guide
  • Android SDK Integration Guide
  • Web SDK Integration Guide
    • Example Web SDK Integration
  • Golang SDK Integration Guide
  • React Native SDK Integration Guide
  • Flutter SDK Integration Guide
  • WordPress Plugin Integration Guide
  • Discord Bot Integration Guide
  • FAQ
  • Support
  • Once you hit scale - Fees
  • Adjust language & default country code
  • SMS Terms and Conditions
  • Privacy-Policy
Powered by GitBook
On this page
  • Overview
  • Requirements
  • Steps
  • 1. Installation
  • 2. Get Credentials
  • 3. Configuration
  • 4. Using the iOS SDK
  • 5. You Are All Set!
  • Sample

Was this helpful?

iOS SDK Integration Guide

PreviousUsage GuidelinesNextAndroid SDK Integration Guide

Last updated 2 years ago

Was this helpful?

Overview

Requirements

  • Xcode 11.4+

  • Swift 5.0

  • iOS 11.0+

Please update to the latest SDK!

Steps

1. Installation

pod 'HumanIDSDK'

2. Get Credentials

3. Configuration

Add this code to your AppDelegate.swift and make sure all the values are fulfilled.

import HumanIDSDK

           @UIApplicationMain
           class AppDelegate: UIResponder, UIApplicationDelegate {

             func application(_ application: UIApplication, didFinishLaunchingWithOptions 
launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
                HumanIDSDK.shared.configure(clientID: "YOUR_CLIENT_ID", clientSecret: 
"YOUR_CLIENT_SECRET")
             }
           }

4. Using the iOS SDK

Add this code to your ViewController file. We recommend you wrap this in a function that handles the login button.

import HumanIDSDK

           class YourViewController: UIViewController {

           @IBAction func yourLoginAction(_ sender: Any) {
               HumanIDSDK.shared.requestOtp(view: self, name: "YOUR_APPLICATION_NAME", image: "YOUR_APPLICATION_LOGO")
               }
           }

           extension YourViewController: RequestOTPDelegate {

           func login(with token: String) {
               // TODO You can persist our token here.
               }
           }

5. You Are All Set!

Your iOS app should now be integrated with the humanID login.

Sample

  • Warning! To run the example project, clone the repo, and run pod install from the Example directory first.

The humanID SDK is available through . To install it, simply add the following line to your Podfile:

Get the clientID and clientSecret through the .

See our Github for a full to learn more!

CocoaPods
App Registration Form
sample
Requirements
Steps
Sample
Installation
Get Credentials
Configuration
Using the iOS SDK