iOS SDK Integration Instructions for Swift Environment

The SDK can be found here:

Self Service Signup:


The following is a step by step guild to using the nuu:bit SDK in a Swift environment. 

Step 1 - Place the RevSDK.framework into the project folder.


Step 2 -  In Xcode, go to "Linked Frameworks and Libraries" in your project settings (tab General). Click the Add (+) button. Click "Add other" button and select RevSDK.framework that you copied to your project folder.

Step 3 - Go to "Embedded Binaries" in the same project settings tab. Click the Add (+) button. In the window that appears, select "RevSDK.framework" then click "Add".



Step 4 - Open the "info.plist" file.  Add the following root element:


Step 5 - Adding a Swift Bridging Header


In order to use the Object-C library in a swift environment, there needs to be a bridge header.  If the project is already being used Bridging Header simply go to the next step.

Create a new header file in your project.


Step 6 - Click the "Build settings", section Swift Compiler - Code Generation.  In the "Objective-C Bridging Header", specify the header file you created.

Step 7 - To create the bridging.h or adding #import <RevSDK/RevSDK.h> to the bridge header.


//  Example Briding Header File for use with nuu:bit //
#ifndef Example_Example_ObjCBridgeing_h
#define Example_Example_ObjCBridgeing_h
 #import <RevSDK/RevSDK.h>


Step 8 - To initialize the nuu:bit SDK add the following line to the AppDelegate.swift. Add in the didFinishLaunchingWithOptions function add the following line:


xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx is the nuu:bit SDK key which is generated from the portal.RevSDK.startWithSDKKey("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");

As an example:


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 
// Override point for customization after application launch.
return true

Step 9 - Build project and control the nuu:bit from the portal. 

Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk