I will start writing from the very beginning. Suppose you have a project in Objective-C, and now you want to continue developing your project in Swift. Follow the guidelines below: (This is according to your specific needs)
First select a new file from File-> New-> File . In this process, select your language as Swift . In the last step, you will be prompted for a Create Bridging Header . Choose this:

Now create the project once ( β + B ). You may receive an error message:

Change the target minimum deployment to a version supported by Swift . (Example in the following screenshot) 
Use Objective-C resources in Swift files:
You now have one ProjectName-Bridging-Header.h file in your project. If you want to use any Objective-C class in your Swift files, you simply include the header file of this class in this bridge header file. As in this project, you have the ESP_NetUtil and ESPViewController and their header files. You want to expose them to Swift and use them later in Swift code. Therefore, import them into this bridge header file:

Build again. Now you can go to your Swift file. And use the Objective-C classes as if you were using any resource in swift. Cm:

NB: you should expand all class headers (which you intend to use later in Swift) in that header file header
To use Swift resources in Objective-C files:
Now you may be surprised I successfully used Objective-C resources in Swift. How about the opposite? Yes! You can do the other way around. Find Target->Build Settings->Swift Compiler - General->Objective-C Generated Interface Header Name . This is the header file that you will use in your Objective-C classes for any Swift to Objective-C functionality. Find out more here .

Now in any of the Objective-C classes, import this interface header and use the Swift resources in the Objective-C code:

You will get more insight from Apple's official documentation .
You can check out the developed version of the related project here with Objective-C - Swift .
nayem
source share