iOS: Dynamic Framework based on static library dependency

Viewed 446

I am working on creating a Dynamic Framework (Cocoa Touch Framework) that has to use a VideoKit lib as a core. Library is a .a file with a number of header files (about 20) and example ViewControllers in ObjC (you can grab demo SDK from: Link). In the future my Framework will be providing a player widget written in Swift (based on sources from ObjC and some other specific features) to DemoApp. But for now I cannot handle dependency in my Dynamic Framework in a proper way.

My first approach was to add the SDK to Framework project. I followed instructions provided by a producer but instead of adding SDK to the App project I added it to the Dynamic Framework Project. There was no module map file and no Umbrella header for VideoKit library so I created them. The result was that some errors went away (related to Headers in the module). I also removed Controllers source files from compiled sources because I did not need them - I just wanted to run the core in the first place. I got stuck on errors saying that there are no symbols for various architectures (x86, arm64).

My second approach was based on what I read on SO and other resources. I moved the dependency to the App project. In the Dynamic Framework Build Settings I added paths to Headers and Library sources from VideoKit SDK that are now stored in the App Project. Again, I am stuck with „Undefined symbols for architecture” errors.

I would appreciate if someone can guide me what I am doing wrong - it is my first time when I have to build framework with dependency on static library and cannot use Dependency Managers to resolve it - actually it is my first time on building iOS Framework ever.

Here is a link to the repo with my actual work on this problem: Repo

I had to remove VideoKit SDK from project because of license restrictions. You have to download it and add it manually.

0 Answers
Related