Advanced : Integrate into an iOS Swift project in XCode 6+

The SDK can be added in any Swift project for instance taking advantage of the Cocoa pods integration

I] In your Podfile located in the root of your project, add:
platform :ios, "7.0" pod 'UbuduSDK'

II] Run pod install

III] Once the framework or pod has been installed you need to add a bridging header, which Xcode automatically creates when you want to add the first Objective-C file to a Swift project.

So in an empty project we just add a file called “dummy”. This file can be deleted later.


Then Xcode will ask


This auto-generation will also add the corresponding path to this header file into your Build Settings.


Into this header file cocoapods-test-Bridging-Header.h you can then add the required header
#import <UbuduSDK/UbuduSDK.h>

IV] Then in the AppDelegate.swift add the protocol UbuduSDKDelegate, the initialization of the UbuduSDK and the minimal callbacks functions. For instance :

class AppDelegate: UIResponder, UIApplicationDelegate, UbuduSDKDelegate {

var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -&gt; Bool {
    // Override point for customization after application launch.
    var ubuduSDK = UbuduSDK.sharedInstance() as UbuduSDK
    let namespace : NSString = &quot;634b207ee2f313c109c58675b44324ac2d41e61e&quot;
    ubuduSDK.delegate = self
    var error: NSError?
    if error != nil {
        println(&quot;Error in starting the Ubudu SDK&quot;)
    return true

func application(application: UIApplication!, didReceiveLocalNotification notification: UILocalNotification!) {
    // let it handle by default by the Ubudu SDK

... }