Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt

Step 1 - Download and Import the Cardinal Mobile SDK

Download the CardinalMobile.framework file using the following cURL.

Code Block
languageapplescript
titleDownload cURL
curl -L -u<USER_NAME>
        :<API_KEY> https://cardinalcommerce.bintray.com/ios/<VERSION>-<BUILD_NUMBER>/cardinalmobilesdk.zip
        -o <LOCAL_FILE_NAME.EXT>

#Example: 
curl -L -uUserName:ApiKey "https://cardinalcommerce.bintray.com/ios/2.2.3-1/cardinalmobilesdk.zip" -o cardinalmobile2.2.3-1.zip


In your XCode project, drag CardinalMobile.framework file into the Frameworks group in your Xcode Project (create the group if it doesn't already exist). In the import dialog, tick the box to Copy items into destinations group folder (or Destination: Copy items if needed). The iOS SDK files are now available for linking in to your project.


Info

For Bintray username and API Key please reach out to your client manager.

Step 2 - Setting Up Your Build Environment

  1. Open Xcode and click on your project in the source list to the left of the main editor area.
  2. Select your application under the Targets section and go to the General tab.
  3. Expand the Embedded Binaries section then click the small “+” button at the bottom of the list.
  4. Add the CardinalMobile.framework from the list

Step 3 - Configure Cardinal Mobile SDK

Upon successfully completing Integration in Step 1 and Step 2, create a new instance of the cardinal object by [CardinalSession new]. SDK offers multiple configuration options for you (if not specified, everything is set to default). For more details: CardinalConfigurationOptions. Use the code snippet below for completing the configuration


Expand
titleObjective-C


Code Block
languagejava
#import <CardinalMobile/CardinalMobile.h>


Code Block
languagejava
CardinalSession *session;

//Setup can be called in viewDidLoad
- (void)setupCardinalSession {
	session = [CardinalSession new]; 
	CardinalSessionConfiguration *config = [CardinalSessionConfiguration new];
	config.deploymentEnvironment = CardinalSessionEnvironmentProduction;
	config.requestTimeout = CardinalSessionTimeoutStandard;
	config.challengeTimeout = 8;
	config.uiType = CardinalSessionUITypeBoth;

	UiCustomization *yourCustomUi = [[UiCustomization alloc] init];
	//Set various customizations here. See "iOS UI Customization" documentation for detail.
	config.uiCustomization = yourCustomUi;

	UiCustomization *yourDarkModeCustomUi = [[UiCustomization alloc] init];
	config.darkModeUiCustomization = yourDarkModeCustomUi;


	CardinalSessionRenderTypeArray *renderType = [[CardinalSessionRenderTypeArray alloc] initWithObjects:
    	                       	CardinalSessionRenderTypeOTP,
        	                   	CardinalSessionRenderTypeHTML,
								CardinalSessionRenderTypeOOB,
								CardinalSessionRenderTypeSingleSelect,
								CardinalSessionRenderTypeMultiSelect,
            	               nil];
	config.renderType = renderType;

	[session configure:config];
}



Expand
titleSwift


Code Block
languagejava
import CardinalMobile


Code Block
languagejs
var session : CardinalSession!

//Setup can be called in viewDidLoad
func setupCardinalSession{
	session = CardinalSession()
	var config = CardinalSessionConfiguration()
	config.deploymentEnvironment = .production
	config.requestTimeout = 8000
	config.challengeTimeout = 8
	config.uiType = .both

	let yourCustomUi = UiCustomization()
	//Set various customizations here. See "iOS UI Customization" documentation for detail.
	config.uiCustomization = yourCustomUi

	let yourDarkModeCustomUi = UiCustomization()
	config.uiCustomization = yourDarkModeCustomUi

	config.renderType = [CardinalSessionRenderTypeOTP, 
							CardinalSessionRenderTypeHTML,
							CardinalSessionRenderTypeOOB,
							CardinalSessionRenderTypeSingleSelect, 
							CardinalSessionRenderTypeMultiSelect]

	session.configure(config)
}



Info
titleSecurity Guide

After you configure cardinalSession, call method getWarnings to get the list of all the warnings for the particular device. Take further action based on the warnings found.

List of warnings can be accessed as follows:

NSArray<Warning *> *warnings = [session getWarnings];

Goto Security Guidance for detail.



...

MethodDescriptionDefault ValuePossible Values

deploymentEnvironment

The environment SDK connects to.

CardinalSessionEnvironmentProduction

  • CardinalSessionEnvironmentStaging
  • CardinalSessionEnvironmentProduction

timeout

Sets the maximum amount of time (in milliseconds) for all exchanges8000
requestTimeoutSets the maximum amount of time (in milliseconds) for all exchanges8000Milliseconds
challengeTimeout

Challenge Screen Timeout in Minutes.

5Greater than or equal to 5 Minutes.
uiTypeInterface types that the device supports for displaying specific challenge user interfaces within the SDK.

CardinalSessionUITypeBoth

  • CardinalSessionUITypeBoth
  • CardinalSessionUITypeNative
  • CardinalSessionUITypeHTML
renderType

List of all the RenderTypes that the device supports for displaying specific challenge user interfaces within the SDK.

[CardinalSessionRenderTypeOTP,

CardinalSessionRenderTypeHTML,

CardinalSessionRenderTypeOOB,

CardinalSessionRenderTypeSingleSelect,

CardinalSessionRenderTypeMultiSelect]

  • CardinalSessionRenderTypeOTP
  • CardinalSessionRenderTypeHTML
  • CardinalSessionRenderTypeOOB
  • CardinalSessionRenderTypeSingleSelect
  • CardinalSessionRenderTypeMultiSelect

proxyServerURL

Proxy server through which the Cardinal SDK Session operates.

nilString Value 

enableQuickAuth

Enable Quick AuthenticationfalseBoolean
uiCustomizationSet Custom UICustomization for SDK Controlled Challenge UI.nil
enableDFSyncEnable DF Sync to get onSetupCompleted (Step 4) called after collected Device Data is sent to the server.trueBoolean

threeDSRequestorAppURL

Merchant app declaring their URL within the CReq message so that the Authentication app can call the Merchant app after OOB authentication has occurred. Each transaction would require a unique Transaction ID by using the SDK Transaction ID.

nilString Value 
darkModeUiCustomizationSet Custom UICustomization for SDK Controlled Challenge UI.nil-

...