HyperID Dev Docs
  • What is HyperID
  • About Developer Docs
  • Quick Start Guide
    • Quick Overview
    • Application Registration
    • Authentication Integration
  • Demo Hub
    • Intro to Demos
    • Interactive Web Demo
    • Android Demo Walkthrough
    • iOS Demo Showcase
    • Unity Authorization Example
  • Documentation
    • Introduction
    • Client Registration
    • Client Authentication
    • Connect Discovery
    • Access Tokens and Refresh Tokens
      • Token Structure
      • Token Payload Insights
      • Token Retrieval
      • Token Validation
      • Token Reissue
      • Token Revocation and Logging Out
    • Wallets
    • Transactions
    • KYC
    • 2FA Verification
      • Request Available 2FA Methods
      • Start 2FA Verification
      • Complete 2FA Verification
    • Custom MFA Requests
      • MFA Request Templates
      • MFA Availability Check
      • Starting an MFA Request
      • Check MFA Request Status
      • Canceling an MFA Request
    • Services Storage and Interoperability
      • User Data Set
      • User Data Get
    • Revoke Consent
Powered by GitBook
On this page
  • Exploring Source Code
  • Configuring Redirect URI Processing
  1. Demo Hub

iOS Demo Showcase

Demo example of integrating HyperID into an iOS application

PreviousAndroid Demo WalkthroughNextUnity Authorization Example

Last updated 1 year ago

Apple's URLSessionDataTask is the powerful and versatile framework that simplifies communication with external APIs, including the HyperID REST API.

Developers can explore the comprehensive that provides an in-depth understanding of each HTTP request and its corresponding response structures. URLSessionDataTask can handle identical requests.

Incorporating authorization flows that require interactions with a browser component is another important task for developers when integrating HyperID. As part of the demo, developers will have the opportunity to explore two different approaches (please see the detailed explanation ):

  1. Using an external browser.

  2. Using an internal WKWebView class (from LoginWithWebView function).

Exploring Source Code

The source code is available on GitHub:

The ViewController.swift file contains the essential source code for handling authorization, with multiple classes that are critical to the process, including:

  • The eBrowser class facilitates the initiation of an external browser dedicated to the authorization flow. It is essential to ensure that all parameters are properly URL-encoded.

  • The eRedirectUriListener class is implemented to monitor and capture the redirect_uri callback.

  • The eConst class encompasses configuration constants such as clientID, client_secret, and redirect_uri. To facilitate testing and integration, developers can register their own Client via the HyperID Developer's Portal and utilize their individual credentials.

When using a custom clientID/clientSecret, it is important to ensure that the configured redirect URI is also registered through the HyperID Developer's Portal. This step is required to ensure successful integration.

Configuring Redirect URI Processing

To configure redirect URI processing on iOS, are utilized.

The handling of callbacks is done in the HandleDeepLink(notification: Notification) function.

Developers can configure the deeplink in the Info.plist file or through the xCode configuration:

Interactive Web Demo
here
https://github.com/HyperIDMaster/HyperID-iOS-Integration-Demo
deeplinks