Integration

CocoaPods

The biidCoreSDK can be installed into an Xcode project using CocoaPods.

Cocoapods can be installed with the following command:

$ gem install cocoapods

CocoaPods 1.3.0+ is required to build the biidCoreSDK.

To integrate biidCoreSDK into your Xcode project using CocoaPods, specify it in your Podfile as follows:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'biidCoreSDK', '0.10.195'
end

Then, run the following command to install the SDK and any other dependencies:

$ pod install

Manifest File

A manifest file is required to successfully initialize the biidCoreSDK. The manifest file contains metadata such as an app key, URL endpoints for services and other settings required for app integration.

biid will provide a Manifest file and it should added to a build target so that it is available from within the bundle of the built app.

On initialization the SDK will check for the presence of a valid manifest file and load the settings accordingly.

Example of a manifest file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>AppKey</key>
    <string>oiXE4xSZj8yqcatZNRbI4wxADyWM1WLsXz1qlpqfiWzaTO45ZRqfyEft0ypS</string>
    <key>EndPoint</key>
    <string>api.bank-integration.com</string>
    <key>CertificatePin</key>
    <string>/UPj4MEGyASlY+b/b3Emz0paw3As=</string>
    <key>PublicKey</key>
    <string>-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzejUt4hyiJ/Y72QZsaiy
jA1Ky+kLO9i56U95Of/U5YQIW8JKdFaB/J09cLY9H0Wa5ugAjOLZP4z7HcTA0GWG
pyFOgaxJedLp5S4BdoyLhhl9HcNo/9vThZ7dx+zwjihQ6Bct0PEFiJXVKrRy3YEA
WOEGBhaGv9d18w3j5P0NpBpnCxZjAHOvOGa1xFhWVsT1gztCLI6iidq6m9bPDM4e
KN3w6A47057LyaamtYwJugiO1Ts1HIfAoVzVfHktcVS3XSu0M0G3PXxt9xswf3bc
Buo8m4WhxVZihYKuTplb2Ctu03uG26MlAMlyuDjhRJziD3Njzrmd16iJHD1bvdmO
fQIDAQAB
-----END PUBLIC KEY-----</string>
    <key>PublicKeyModulus</key>
    <string>00cde9e4b78872889fd8ef6419b1a8b28c0d4acbe7cb3bd8b9e94f7939ffd4e584085bc24a745681fc9d3d70b63d1f459ae6e8008ce2d93f8cfb1dc4c0d06586a7214e81ac4979d2e9e52e0172bc8b86197d1dc368ffdbd3859eddc7ecf08e2850e8172dd0f1058895d52ab472dd810058e106061686bfd775f30de3e4fd0da41a670b16630073af3866b5c4585656c4f5833b422c8ea289daba9bd6cf0cce1e28ddf0e80e3bd39ecbc9a6a6b59c09ba088ed53b351e87c0a15cd57c792d7154b75d2bb43341b73d7c6df71b307f76dc06ea3c9b32b1c556628582ae4e995bd82b6ed37b86d7932500c972b838e1449ce23750e3ceb99dd7a8891c3d5bbdd98e7d</string>
    <key>PublicKeyExponent</key>
    <string>10001</string>
    <key>AllowsMultipleEntities</key>
    <true/>
    <key>Checksum</key>
<string>BBC7C36327582DA4FA5A55CB25D6D8D230805082493D85CBDE1666C4D0AE15D4F4D4E55DE8E7AFCA253EAAED1190E157BD231F852A878BA1E3831399451A2FD3</string>
</dict>
</plist>

The following manifest related errors can be returned when Initializing the SDK

Referencing the biid Client

The biid client, and its public functions and properties, is accessible through the SDK’s getClient() function.

Assigning the biid client to a var can be done as follows:

Swift3

    var biidClient = SDK.getClient

ObjC

    id<Client>biidClient = [SDK getClient];

Alternatively the getClient function can be called inline if preferred:

Swift3

    SDK.getClient.xxxxxx

ObjC

    [SDK.getClient xxxxxx];

Documentation

Initializing the SDK

The SDK can be initialized as follows:

Swift3

    do {
        try SDK.getClient.initialize()
    }
    catch (let exception) {
        // Handle exception
    }

ObjC

    NSError *error;
    [SDK.getClient initialize:&error];
    if (error) {
        // Handle error
    }

Documentation

Getting the device’s installation ID:

Swift3

    let DUID = SDK.getClient.deviceInstallationID

ObjC

    NSString *DUID = SDK.getClient.deviceInstallationID;

Documentation