Bridge
1. Create an xxx bridge header
Add the bridge title to your project using the method you have chosen, the simplest of which is to create a single .m file and answer to Create a title for the header in this dialog box:

2. Link to Pod in the title bar
Include your files like this:
// // Use this file to import your target public headers that // you would like to expose to Swift. #import "RTCICEServer.h"
3. Objective-C is exposed to Swift
Once in the bridge header you don't need to import the Obj-C classes into Swift. Use them directly:
let uri = URL(fileURLWithPath: "") let rtc:RTCICEServer = RTCICEServer(uri: uri, username: "", password: "") print(rtc)
Another example is described here .
► Find this solution on GitHub and more about Quick Recipes .
SwiftArchitect
source share