DEV Community

Rlogical Techsoft Pvt Ltd
Rlogical Techsoft Pvt Ltd

Posted on

What is a bridging header in Swift?

You can use Objective-C and Swift files together in a single project, no matter which language the project used originally. This makes creating mixed-language app and framework targets as straightforward as creating an app or framework target written in a single language.

How to create a bridging header?

Let’s see here step-by-step guidelines:
File -> New -> File -> Header File

  1. Name your Header file like this yourAppName-Bridging-Header
  2. Now click on your Project -> Build Settings
  3. Change from Basic to All
  4. Search Bridging
  5. You will get the search result as shown in the below image
  6. In that double click the right of Objective-C Bridging Header and enter as follows eg, yourAppName/yourAppName-Bridging-Header.h

you can click here & see the screen shot for the reference.https://rlogicaltech.medium.com/what-is-a-bridging-header-in-swift-aae3372101fe

Top comments (0)