On This Page

{#jumplink-list}  
[Markdown](/content/cybsdeveloper2021/amer/en/docs/barclays/en-us/payer-authentication/developer/all/rest/payer-auth/pa-sdk-intro/pa-sdk-ios-intro/pa-sdk-ios-configure-sdk.md)

Configuring the iOS SDK {#reference_sr5_1c2_xpb}
================================================

Use **CardinalSession new** to create a new instance of the cardinal object. Use the default configuration options. Study these 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 &lt;CardinalMobile/CardinalMobile.h&gt;

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                                                                                                                                                              |
|:-----------------------|:------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| deploymentEnviron ment | The environment to which the SDK connects.                                                                              | CardinalSessionEnviron mentProduction                                                                                                                                           | CardinalSession Environment Staging CardinalSessionEnvi ronment Production                                                                                                   |
| timeoutInMilli seconds | 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.              | CardinalSessionUIType Both                                                                                                                                                      | CardinalSessionUIT ypeBoth CardinalSessionUIT ypeNative CardinalSessionUIT ypeHTML                                                                                           |
| renderType             | List of all the render types that the device supports for displaying specific challenge user interfaces within the SDK. | \[CardinalSessionRend erTypeOTP, CardinalSessionRend erTypeHTML, CardinalSessionRend erTypeOOB, CardinalSessionRend erTypeSingleSelect, CardinalSessionRend erTypeMultiSelect\] | CardinalSessionRen derType OTP CardinalSessionRen derType HTML CardinalSessionRen derType OOB CardinalSessionRen derType SingleSelect CardinalSessionRen derType 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                                                                                                                                                                           |                                                                                                                                                                              |
[iOS Configuration Options]

RELATED TO THIS PAGE

* <>

