This guide will walk though how to make use of Adaptive Access in a native iOS application using the IBM Security Verify Adaptive SDK for iOS. The Adaptive SDK for iOS provides classes which manage authentication transactions that are dependent on policies that include Adaptive access risk determinations.
For a deeper understanding on the different entities involved in Adaptive Access see Adaptive Access.
Ensure that your IBM Security Verify tenant has the Adaptive Access subscription enabled. You can check you active subscriptions under Configuration > Subscriptions in your tenant administration console.
You must have Xcode installed on the machine where you will create and run the sample application described in this guide. Xcode is available from the AppStore on MacOS. Download Xcode here.
You need to have the Adaptive SDK for iOS available in your development environment. This can be downloaded from the IBM Security App Exchange.
Create a custom application definition and perform Adaptive Sign-On on-boarding. As part of the on-boarding process ensure you select mobile. This will create a link where you can download the Trusteer SDK. For more information, see On-board your application.
Use the link that is displayed after Adaptive Sign-On on-boarding to download the Trusteer SDK.
You will now set up your development environment by creating a new mobile application and installing the initial dependencies.
Xcode includes several built-in app templates for developing common types of iOS apps.
- Open Xcode from the /Applications directory.
- In the welcome window, click Create a new Xcode project (or choose File > New > Project). ...
- Select iOS at the top of the dialog.
- In the Application section, select Single View Application and then click Next.
- In the dialog that appears, use the following values to name your app and choose additional options for your project:
Xcode uses the product name you entered to name your project and the app.
|If this is not automatically filled in, set the team to None.
|The name of your organization or your own name. You can leave this blank.
|Your organization identifier, if you have one. If you don’t, use com.example.
|This value is automatically generated based on your product name and organization identifier.
A Universal app is one that runs on both iPhone and iPad.
|Use Core Data
|Include Unit Tests
|Include UI Tests
- Click Next.
- In the dialog that appears, select a location to save your project and click Create.
Xcode opens your new project in the workspace window.
- Unzip the SDK packages that you downloaded in the pre-requistes section.
- In Xcode, open the framework target's General settings
- Add the following to the Linked Frameworks and Libraries section:
Framework/IBMAdaptiveKit.xcframeworkfrom the Adaptive SDK for iOS package.
.xcframeworkfrom the Trusteer SDK package.
- In your Xcode project, right click a folder and select Add file to ...
- Navigate to the folder where the Trusteer SDK was extracted and select
- Check Copy items if needed, then click Add.
In the code files, for example ViewController.swift, include the framework references for the application.
The Adaptive SDK for iOS creates and manages an authentication transaction which includes initial (first-factor) authentication and optional Multi-Factor Authentication (MFA), managing state across requests.
When integrating with the Adaptive SDK for iOS, there are three types of responses which need to be handled:
- Allow - Authentication complete. Identity and Access Tokens are included with this response.
- Deny - User is denied access. No further action is possible.
- Requires - Additional authentication required. Information on allowed methods provided.
The SDK functions can also throw errors. This may happen when, for example, the supplied username and password are incorrect.
You must handle these responses with you own implementation.
See the sample code reference files.
Updated 4 months ago