I was looking for integrating my one of the Static library written in Objective-C into new swift project & you know what I got very little information on it. I struggled alot to make my things working with Objc+swift integration for my project.
Here I will guide you through such integration
1. Suppose you have some static Library XYZ written in Objective-C
Add that library as subproject into your target project as descried HERE
Then we have to create Bridge-header which will make swift code to access Objective C part of your library.
You can just follow
Xocde -> New -> File
there you need to add header file (from iOS/OS X section)
be carefull whilte naming this file. this file should have name like
Here I will guide you through such integration
1. Suppose you have some static Library XYZ written in Objective-C
Add that library as subproject into your target project as descried HERE
Then we have to create Bridge-header which will make swift code to access Objective C part of your library.
You can just follow
Xocde -> New -> File
there you need to add header file (from iOS/OS X section)
be carefull whilte naming this file. this file should have name like
<product_module_name>-Bridging-Header.h : Default Product module name is project name itself.
you can read more about "Product module name" at Apple Docs
Now add import statements in <product_module_name>-Bridging-Header.h for accessing Native SDK Classes
e.g.
If you have Project with name "sampleSwift" then your bridge file should look like
e.g.
If you have Project with name "sampleSwift" then your bridge file should look like