1

I have ported an objective-c package into a swift package and included it within the bridging header. Everything works fine, except there is a function I have to implement from a delegate I can't get working:

- (void) mdwamp:(MDWamp*)wamp sessionEstablished:(NSDictionary*)info;

Does anyone know how I can implement this in SWIFT?

John Doe
  • 836
  • 2
  • 10
  • 17

1 Answers1

1

In the bridging header make sure you imported the objective-c header.

After doing that, you can use the following.

var instance: ClassName = ClassName()

instance.mdwamp(wamp, sessionEstablished: info)
BSMP
  • 4,596
  • 8
  • 33
  • 44
Zirk Kelevra
  • 230
  • 1
  • 6