Comment on page
iOS Demo Showcase
Demo example of integrating HyperID into an iOS application
URLSessionDataTaskis the powerful and versatile framework that simplifies communication with external APIs, including the HyperID REST API.
Developers can explore the comprehensive Interactive Web Demo that provides an in-depth understanding of each HTTP request and its corresponding response structures.
URLSessionDataTaskcan 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 here):
- 1.Using an external browser.
- 2.Using an internal WKWebView class (from
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
- 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.
The handling of callbacks is done in the
Developers can configure the deeplink in the
Info.plistfile or through the xCode configuration: