REST API

Configure the iOS SDK

Create a new instance of the cardinal object by
CardinalSession
new. It is recommended to use the default configuration options. See the following examples to complete the iOS SDK configuration.
For more details on configuration options, refer to the table after the examples.
CardinalSession new (iOS SDK - Objective-C)
#import <CardinalMobile/CardinalMobile.h> CardinalSession *session; //Setup can be called in viewDidLoad - (void)setupCardinalSession { session = [CardinalSession new]; CardinalSessionConfiguration *config = [CardinalSessionConfiguration new]; config.deploymentEnvironment = CardinalSessionEnvironmentProduction; config.timeout = CardinalSessionTimeoutStandard; config.uiType = CardinalSessionUITypeBoth; UiCustomization *yourCustomUi = [[UiCustomization alloc] init]; //Set various customizations here. See "iOS UI Customization" documentation for detail. config.uiCustomization = yourCustomUi; CardinalSessionRenderTypeArray *renderType = [[CardinalSessionRenderTypeArray alloc] initWithObjects: CardinalSessionRenderTypeOTP, CardinalSessionRenderTypeHTML, nil]; config.renderType = renderType; config.enableQuickAuth = false; [session configure:config]; }
CardinalSession new (iOS SDK - Swift)
import CardinalMobile var session : CardinalSession! //Setup can be called in viewDidLoad func setupCardinalSession{ session = CardinalSession() var config = CardinalSessionConfiguration() config.deploymentEnvironment = .production config.timeout = 8000 config.uiType = .both let yourCustomUi = UiCustomization() //Set various customizations here. See "iOS UI Customization" documentation for detail. config.uiCustomization = yourCustomUi config.renderType = [CardinalSessionRenderTypeOTP, CardinalSessionRenderTypeHTML] config.enableQuickAuth = true session.configure(config) }
Method
Description
Default Values
Possible Values
deploymentEnvironment
The environment to which the SDK connects.
CardinalSessionEnvironmentProduction
CardinalSessionEnvironment
Staging
CardinalSessionEnvironment
Production
timeoutInMilliseconds
Maximum amount of time (in milliseconds) for all exchanges.
8000
uiType
Interface types that the device supports for displaying specific challenge user interfaces within the SDK.
CardinalSessionUITypeBoth
CardinalSessionUITypeBoth
CardinalSessionUITypeNative
CardinalSessionUITypeHTML
renderType
List of all the render types that the device supports for displaying specific challenge user interfaces within the SDK.
[CardinalSessionRenderTypeOTP,
CardinalSessionRenderTypeHTML,
CardinalSessionRenderTypeOOB,
CardinalSessionRenderTypeSingleSelect,
CardinalSessionRenderTypeMultiSelect]
CardinalSessionRenderType
OTP
CardinalSessionRenderType
HTML
CardinalSessionRenderType
OOB
CardinalSessionRenderType
SingleSelect
CardinalSessionRenderType
MultiSelect
proxyServerURL
Proxy server through which the Cardinal SDK Session operates.
nil
enableQuickAuth
Enable Quick Authentication
false
uiCustomization
Set Custom UICustomization for SDK Controlled Challenge UI.
nil
enableDFSync
Enable DF Sync to get onSetupCompleted called after collected device data is sent to the server.
false