TrillBit SDK
  • Introduction
  • technological overview
    • In this release
    • Use cases
    • Quick links
  • features
    • Payloads and Datarates
    • Protocols
    • Configurations
    • Distances
    • Platforms supported
  • demo applications
    • TrillPlay
      • Specifications
    • TrillIoT
    • Knowles SmartMic
  • Knowles smartmic support
    • Trill SDK for Knowles
      • Requirements
      • Setup Guide
        • Licensing and Setting up Trillbit Host library
        • Authentication of the Trillbit IA61x algorithm
        • Sending Data to the SmartMic
      • Trillbit SDK Methods
      • Troubleshooting
  • android support
    • Trill SDK for Android
      • SDK Requirements
      • Setup Guide
        • Licensing credentials
        • Getting started
        • Integrating the SDK
          • Declare your app's audio permissions
          • Import SDK
          • Declare Trill SDK Callback
          • License and Initialise your Trill SDK
      • Methods and Callbacks
        • Sender methods
        • Receiver methods
        • Callbacks
      • Reducing application size
      • Troubleshooting
        • Error codes
  • ios support
    • Trill SDK for iOS
      • SDK Requirements
      • Setup Guide
        • Licensing Trill SDK
        • Getting started
      • Methods and Callbacks
        • Trill SDK Methods
        • Trill SDK Callbacks and delegates
      • Troubleshooting
  • esp 32 support
    • Trill SDK for ESP-32
      • Requirements
      • Platforms supported
      • Setup Guide
        • Licensing and Setting up Trillbit library
        • Sending data to the ESP32 device
      • Methods and Callbacks
      • Troubleshooting
  • embedded linux
    • Trill SDK for Embedded linux
      • Requirements
      • Architectures supported
      • Demo applications
      • Setup Guide
        • Licensing your Trill SDK
        • Compiling example binaries
        • Instantiate Trill SDK
        • Run the demo code
      • Methods and Callbacks
        • Trill SDK Methods
        • Callbacks
      • Troubleshooting
  • Reference
    • References
    • FAQs
Powered by GitBook
On this page
  • Step1: Get your Platform keys
  • Step 2: Setup procedure
  • 1. Add Framework on application.
  • 2. Add Header and Framework Search Path Framework on application.
  • 3. Make sure audio permission are added in info.plist
  • 4. Instantiate TrillSDK Callbacks
  • 5. Initialize TrillSDK
  • Step 3: Licensing TrillBit iOS SDK for your application
  1. ios support
  2. Trill SDK for iOS
  3. Setup Guide

Getting started

PreviousLicensing Trill SDKNextMethods and Callbacks

Last updated 2 years ago

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.

Access the Trillbit developer portal .

Step 2: Setup procedure

1. Add Framework on application.

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

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

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

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

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

SDK_KEY: Your SDK credential key (get it from developers portal)

is_sender_only: Turn it on if you want your device to work only as a sender

device, this wont require recording permissions.

delegates_class: object reference to callbacks class.

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
}
https://developers.trillbit.com/