Inter-App communication for iOS
Launching BioID app
The BioID facial recognition app uses standard iOS inter-app communication via a custom URL scheme (see Apple specification). In order for your iOS app to open the BioID app, you must create a correctly formatted URL and call the
openURL: method of the app object.
To enroll a user biometrically
To verify a user biometrically
|access_token||Required. A BWS web token that has previously been issued by the Token Extension.|
|return_url||Required. A URL to redirect the user to your app after the biometric operation has been carried out. Please take a look at Using URL Schemes to Communicate with Apps.|
|state||Recommended. Client specific data to maintain state between request and callback. For example you might want to add some information about the user you are verifying.|
Before you begin, you have the choice
A.1 Get a Client ID
To connect with the app using BioID Connect requires a client ID and client secret. If you already registered in the app, simply use the account you created. If you do not yet have a BioID account you will first need to register. Then go to your profile and select BioID Connect to register a new client application. You will then receive your client ID and secret.
A.2 User registration and enrollment
Your end users install the BioID app and sign up for a BioID account; they will then be prompted to enroll their biometrics.
B.1 Request a trial instance of BioID Web Service (BWS)
You can apply for a trial instance of the BioID Web Service. After the trial instance has been set up you can continue to create and configure your BWS client application.
B.2 Register a BWS client application
Create and configure your BWS client application on BWS Portal.
Select your BWS Client and go to Configuartion section and create a Web API key. In the dialog window the app identifier and secret is shown. Both values are required for your app later on (the real data replacing the placeholder text for CLIENT_APP_ID and CLIENT_APP_SECRET constants in sample code below).
Take a look at the Web API endpoint for the example https://bws.bioid.com/extension (BWS-Installation Multitenant). In this case the BWS instance name is bws. This would replace the dummy text for the BWS_INSTANCE_NAME constant in the sample code below then.
For the creation of BCIDs for users in your app the following information is needed
Storage e.g. bws
Partition e.g. 12
ClassID – this is a unique number you assign to the user, e.g. 4711. The BCID with the example values from above is bws.12.4711. This value consisting from the three parts storage, partition and ClassID separated by a period ('.') would replace the dummy text for the BCID constant in the sample code. For more information about BCID take a look at Biometric Class ID.
Now you have all necessary data to call BWS!
B.3 User registration and enrollment
When you use the app with your own identity management, the app simply provides a pass-through function for enrollment and verification using the BWS token you provide, and ignores the BioID account (if any) registered to the user's device.
B.4 Request BioID Web Service (BWS) Token
The following sample code explains how to request a BWS token and call the BioID app. For more information please take a look at Request a BWS token to be used for authorization.
B.5 Verify BWS Result
The inter-app communication is a good helper to interchange data between apps but not in a secure way. Therefore you must validate the BWS result in the callback to your app. This can be done very simply. The BioID app calls your app back and your app receives a BWS result as access_token.
The following example code now shows you how to validate this BWS result token from your app. For more information please take a look at Fetches the result of the last biometric operation performed with the token provided.