Android Native:

  1. Download SDK Files.

  2. Add Client ID in

  3. Add Client Secret in

  4. Add Redirect URL in

  5. Choose the Environment, Whether it is staging or production.

  6. In the activity from where UAE Pass Authentication is required, copy the "Adding Custom Scheme and Host" section to the AndroidManifest file to that particular activity, and make the launch mode as singleTask. (android:launchMode="singleTask").

  7. In the modules Build.gradle file, copy the "Adding Custom Scheme Variables" section to the defaultConfig.

  8. Change "URI_SCHEME" and "scheme" value to your app name.

This is a mandatory step to avoid conflicting with other apps in the future.

9. Check whether the project has Kotlin enabled. If not, open app level Build.gradle and copy "Enable Kotlin Version" and "Enable Kotlin Dependency" to respective place. Also in the modules Build.gradle, copy "Enable Kotlin Dependency" section to the dependencies.

10. In the Activity from where UAE Pass Authentication is triggered, copy the section "Callback to handle UAE Pass callback".

A global search can be made for the term "//UAE PASS" which will display the modifications that are required to be made.

iOS Native

  1. Download SDK Files.

  2. Setup the Framework.

- Create LocalPods folder if not already created.

- Add UAEPPASSClient folder in LocalPods folder.

- Add pod 'UAEPassClient', :path => "LocalPods/UAEPassClient" to your podfile.

3. Open AppDelegate and add the following:

- import UAEPassClient

4. In didFinishLaunchingWithOptions, add the below:

UAEPASSRouter.shared.spConfig = SPConfig(redirectUriLogin: "client redirect url",
                                         scope: "client login scope",
                                         state: "RANDOM 24 alpha numeric",  //Randomly Generated Code 24 alpha numeric.
                                         successSchemeURL: "UUUUU://", //client success url scheme.
                                         failSchemeURL: "CCCCC://", //client failure url scheme.
                                         signingScope: "urn:safelayer:eidas:sign:process:document") // client signing scope.
UAEPASSRouter.shared.environmentConfig = UAEPassConfig(clientID: "your client id", clientSecret: "your client secret", env: .production)
env (environment can be : .production or .qa or .dev)
func application(_: UIApplication, handleOpen url: URL) -> Bool {
    print("<><><><> appDelegate URL : \(url.absoluteString)")
    if url.absoluteString.contains(HandleURLScheme.externalURLSchemeSuccess()) {
        if let topViewController = UserInterfaceInfo.topViewController() {
            if let webViewController = topViewController as? UAEPassWebViewController {
        return true

    else if url.absoluteString.contains(HandleURLScheme.externalURLSchemeFail()) {
        guard let webViewController = UserInterfaceInfo.topViewController() as? UAEPassWebViewController  else {
            return false
        let alertController = UIAlertController(title: "Failed to login with UAE PASS Login", message: "Try again later", preferredStyle: .actionSheet)
        let okAction = UIAlertAction(title: "OK", style: UIAlertAction.Style.default) {
            _ in
            NSLog("OK Pressed")
            webViewController.navigationController?.popViewController(animated: true)
        self.window?.rootViewController?.present(alertController, animated: true, completion: nil)
        return false

    return true

5. Add UAE Pass scheme in your project info.plist in LSApplicationQueriesSchemes (Already added in this sample).

for Production: uaepass
for QA: uaepassstg
for DEV: uaepassdev

6. After pressing login with UAE PASS button, choose the prefered environment to login through UIAlertController and from this action a trace can be done to show how it works.

7. From application(_: UIApplication, handleOpen url: URL) -> Bool in AppDelegate

Apply a force to current webview to reload or stop loading incase of success or failure.

This sample contains three view controllers :

-- ViewController.swift (main screen which contains login button and UIAlertController to select required environment).

-- UserProfileViewController.swift (Just simple view to show user profile details and it contains sign document scneario as well).

-- UAEPassWebViewController.swift (Resposible for handling webView requests to generate uaepass code to use it for token generation).

8. For the Signing Flow, the following steps is required:

  1. It should be a valid PDF document, and the sample code for downloading the pdf file is given.

  2. A valid token should be generated for the signing process.

  3. The valid pdf document should then be uploaded to UAE PASS.

  4. After the upload, a request for signing should be sent. The following can then be selected:

    • Signature type: Advanced or Qualified

    • The page which signature will be placed

    • Signature coordinates and Signature size

9. testSignData.json is a very important file as this is the signing information which should be passed to UAEPASS and it is expected to be recieved from the backend. It is also required to be reconfigured to add SP's own app scheme.

This sample supports dark mode as well.

For visitor integration: SP need to use the below scopes to their first authentication call to retrieve the unifiedID and profileType attribute of the user:

 scope=urn:uae:digitalid:profile:general urn:uae:digitalid:profile:general:profileType urn:uae:digitalid:profile:general:unifiedId

Last updated