0

I have to make use of an API which is written in Objective-C but my application uses Swift. I have heard of bridging concept, but I'm not very sure of how to implement it and make use of it in Swift. Is there any other way to make use of Objective-C in Swift?

  • 3
    Try referring to this link, your question has been answered over [here](http://stackoverflow.com/questions/24002369/how-to-call-objective-c-code-from-swift) – Rahul Patel Feb 20 '16 at 06:46
  • The bottom line is that while bridging is necessary, it is almost automatic, and is transparent once you've taken a couple of very simple steps. – David Berry Feb 20 '16 at 06:49

2 Answers2

0

Unfortunately, No.

You have to make use of bridge for it. Check this link (Apple)

Nimantha
  • 6,405
  • 6
  • 28
  • 69
shreshta bm
  • 304
  • 4
  • 11
0

Using bridging header is recommended way and pretty simple. xCode can even auto generate it for you. Follow the instructions here to see how you can implement it and make use of it - http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/

little
  • 2,927
  • 2
  • 25
  • 36