# Usage

## **Initialise the SDK**

The SDK requires to initialise only once when your application starts, we recommend doing this step in AppDelegate

### **Objective-C**

Add the following in your AppDelegate.m:

```objectivec
#import <UqudoSDK/UqudoSDK.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
   [[UQBuilderController alloc] init];  
	return YES;
}
```

### **Swift**

Add the Bridging Header to your project. When adding your .m file, you’ll receive a prompt with Yes, No and Cancel buttons. Hit Yes.

<figure><img src="/files/2LR371EKy6nnHZfL3iCF" alt=""><figcaption></figcaption></figure>

If you don’t see the prompt, or accidentally deleted your bridging header, add a new .h file to your project and name it <#YourProjectName#>-Bridging-Header.h.

Add the following import to your Bridging-Header.h:

```swift
#import <UqudoSDK/UqudoSDK.h>
```

In the AppDelegate.swift, initialize the SDK:

```swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
	UQBuilderController()
	return true
}
```

## Implement Interface

Extend UQBuilderControllerDeleate in your controller where you initiate the SDK.

### **Objective-C**

Import Uqudo SDK header and conform to UQBuilderControllerDeleate:

```objectivec
#import <UqudoSDK/UqudoSDK.h>

@interface YourViewController ()<UQBuilderControllerDelegate>
```

Implement the delegate methods:

```objectivec
- (void)didEnrollmentCompleteWithInfo:(NSString *)info;

- (void)didEnrollmentIncompleteWithStatus:(UQSessionStatus *)status;

- (void)didFaceSessionCompleteWithInfo:(nonnull  NSString *)info;

- (void)didFaceSessionIncompleteWithStatus:(UQSessionStatus *)status;

- (void)didLookupFlowCompleteWithInfo:(NSString *)info;

- (void)didLookupFlowIncompleteWithStatus:(UQSessionStatus *)status;
```

### **Swift**

Conform to UQBuilderControllerDeleate:

```swift
class ViewController: UIViewController, UQBuilderControllerDelegate
```

Implement the delegate methods:

```swift
func didEnrollmentComplete(withInfo info: String) {}

func didEnrollmentIncomplete(with status: UQSessionStatus) {}

func didFaceSessionComplete(withInfo info: String) {}

func didFaceSessionIncomplete(with status: UQSessionStatus) {}

func didLookupFlowComplete(withInfo info: String) {}

func didLookupFlowIncomplete(with status: UQSessionStatus) {}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uqudo.com/docs/kyc/uqudo-sdk/integration/ios/usage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
