0

I want to integrate my ObjectiveC Static Library into my Cococapod framework which is in swift.My objective C Static Library is not uploaded on CocoaPod. I want to add it without creating a pod.

I created a Swift Framework in Xcode and followed the below given link to import my static library How can I use an .a static library in swift? . Xcode generates a header file in which I have added my import.

I created a Swift Framework using CocoaPods procedure. I added my Static Library manually into the Pods Directory.

Question One : In my CocoaPods framework there is no such header file so where can I add my objective c imports. Question Two : Is this the right place to add any external dependency?

I need to use my classes which are written in Objective C into Swift Framework.

To better understand the problem I created an Objective C class into the Swift Framework. This class was able to import the Objective C class. But my swift class was not able to.

Clearly we cannot create bridging headers in frameworks. So how do I do this?

Vadim Kotov
  • 7,103
  • 8
  • 44
  • 57
Cloy
  • 2,051
  • 18
  • 30
  • Add the static library as a git submodule of your swift framework git repo. – trojanfoe Apr 02 '20 at 14:08
  • @trojanfoe.....I have not uploaded my swift source on git.....Can I import the static library into my swift framework? – Cloy Apr 02 '20 at 14:19
  • You should get a GitHub account and keep your projects in private repos. They can then be easily shared with other projects and other people. Not to mention the benefit of source control itself. – trojanfoe Apr 02 '20 at 14:21
  • I understand the advantages of using source control. The reason why I am creating a CocoaPod framework is I have two dependencies one of my static library and another pod framework. So I could either create a pod from my static library and add both the pods as dependencies or add my static library manually. Is that possible? – Cloy Apr 02 '20 at 14:28

0 Answers0