4

I'm trying to connect QuickBlox.framework to the Swift application.

As I know QuickBlox.framework is written on Objective-C. To use it in Swift application we should follow this guide

What I did is:

  1. Create bridge header demo-swift-Bridging-Header.h
  2. Import QuickBlox here: #import <Quickblox/Quickblox.h>

and I got 28 errors:

<unknown>:0: error: ./Quickblox.framework/Headers/Core/Definitions/Consts.h:16: unknown type name 'NSString'
...
<unknown>:0: error: ./Quickblox.framework/Headers/Core/Definitions/Delegates.h:43: expected a type
...

Any ideas?

Rubycon
  • 18,156
  • 10
  • 49
  • 70

1 Answers1

3

You have to modify a bit your bridge file - add all needed frameworks

@import Foundation
@import SystemConfiguration;
@import MobileCoreServices;

#import <Quickblox/Quickblox.h>

Checkout QuickBlox blog post about Swift http://quickblox.com/blog/2014/06/building-ios-apps-with-quickblox-and-swift/

Rubycon
  • 18,156
  • 10
  • 49
  • 70
  • Hi, does this ensure all other chat functionalities can be implemented in QuickBlox using swift ? – Y M Dec 07 '14 at 18:29