1

I'm trying to integrate the oovoosdk into a new Swift project. The oovoosdk is a framework written in Objective-C. I've created a bridging header and that seems to be working, because I can call this in the AppDelegate and I get back a result (the ooVooController is an interface that forms part of the framework):

let result = ooVooController.sharedController().initSdk(kDefaultAppId, applicationToken: kDefaultAppToken, baseUrl: "https://api-sdk.dev.oovoo.com")

The problem is that when I copy the same bit of code outside of the AppDelegate, the project won't compile. I get the warning 'Use of unresolved identifier ooVooController'. It was my understanding that classes imported using the bridging header were made globally available, but there seems to be some kind of visibility issue?

For the record, I don't want to initSdk twice, it's just an example.

Edit: The following code suffers from the same problem 'Use of unresolved identifier ooVooVideoView':

let myCompletelyUniqueViewName = ooVooVideoView(frame: self.view.frame)

Code complete is working fine. I tried adding the class type explicitly:

let myCompletelyUniqueViewName:ooVooVideoView = ooVooVideoView(frame: self.view.frame)

and got 'Use of undeclared type ooVooVideoView'.

happyducks
  • 21
  • 6

2 Answers2

1

I eventually managed to resolve the issue. The affected view controller had a target membership (found under File Inspector) to my test suite which didn't have a bridging header configured. After removing this membership my project compiled and ran.

happyducks
  • 21
  • 6
0

ooVooController looks like a variable you defined previously. Search the AppDelegate class for something like let ooVooController = ....

The error you get is not because the class or framework itself isn't visible but the compiler does not know the variable ooVooController.

Sebastian Wramba
  • 10,087
  • 8
  • 41
  • 58