# Getting started

## Step1: Get your Platform keys

Your API requests are authenticated using **Platform keys**. Any request that doesn't include a platform key will return an error.

You can generate a Platform key from your Trill Dashboard at any time.&#x20;

Access the Trillbit developer portal <https://developers.trillbit.com/>.

## Step 2: Setup procedure

### 1. Add Framework on application.

Go to Build Setting -> General -> Frameworks, Libraries and Embedded Content

<figure><img src="/files/vVm2bkBnRXc52IaCKwMp" alt=""><figcaption></figcaption></figure>

### 2. Add Header and Framework Search Path Framework on application.

Go to Build Setting -> General -> Framework search path / Headers search path

<figure><img src="/files/Gh7w7uQ4wUhuDvM5ki95" alt=""><figcaption></figcaption></figure>

### 3. Make sure audio permission are added in info.plist

<figure><img src="/files/xZiJ3Qi7smZKPRYbAXBP" alt=""><figcaption></figcaption></figure>

### 4. Instantiate TrillSDK Callbacks

Initialize callback inside App Delegates.

```
class AppDelegate: UIResponder, UIApplicationDelegate, TrillCallBackDelegates {
func onError(_ error_code: Int32, _ error: String!) {
print(error);
}
func onInfo(_ info_code: Int32, _ info: String!) {
print(info)
}
func onSDKReady() {
print ("SDK is ready to use");
}
func onPlayingCompleted() {
print ("Playing Completed");
}
func onSendingCompleted() {
print ("Sending Completed with all repeats.");
}
func onDecoded(_ payload: String!) {
print (payload);
}
func onErrorDecoding() {
print (onErrorDecoding);
}

```

### 5. Initialize TrillSDK

To initialize TrillSDK all we need to do is to create TrillSDK Class object with SDK\_KEY, boolean flag (

is\_sender\_only\_sdk and delegate class ) where

<mark style="color:blue;">**`SDK_KEY: Your SDK credential key (get it from developers portal)`**</mark>

<mark style="color:blue;">**`is_sender_only: Turn it on if you want your device to work only as a sender`**</mark>

<mark style="color:blue;">**`device, this wont require recording permissions.`**</mark>

<mark style="color:blue;">**`delegates_class: object reference to callbacks class.`**</mark>

##

## Step 3: Licensing TrillBit iOS SDK for your application

For Licensing the TrillBit SDK for your application:

Replace YOUR\_SDK\_KEY with the Key displayed on your TrillBit developer portal dashboard(iOS).

```
String SDK_KEY = "SDK_KEY_FROM_TRILL_DEV_PORTAL";
```

```
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions:
[UIApplication.LaunchOptionsKey: Any]?) -> Bool {
trill = TrillSDK(delegates: "YOUR_SDK_KEY", false, self);
trill?.initialise();
return true
}
```


---

# 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://trillbit.gitbook.io/trillbit-sdk/ios-support/trill-sdk-for-ios/setup-guide/getting-started.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.
