11

Is it possible to convert dynamic framework to static library?

The problem is that I don't have a source code of framework, but only SomeFramework.framework file which is dynamic library for few architectures

5
  • Is the framework made in Swift ? Commented Feb 14, 2018 at 13:35
  • Haven't tried this myself but worth trying - github.com/pkrmf/dynamic-to-static Commented Feb 14, 2018 at 13:38
  • @Nitish I already tried that, but it require source code and xcodeproj file :-( Commented Feb 14, 2018 at 13:50
  • Found anything? Commented Aug 7, 2018 at 14:54
  • @Emixam23 no luck :-( Commented Aug 7, 2018 at 21:02

1 Answer 1

2

Create a "Cocoa Touch Framework" and add your .framework to the "Linked frameworks and Libraries" then you can:

  • Go to Build Settings > Match-O Type > choose what you want...

or

  • you can also add a "static library" as new target of your dynamic framework.

Don't forget to add the modulemap / Umbrella to expose what you want.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi, thanks for the answer. Request you some more info about where and how to add the modulemap/umbrella?
Thanks! adding a static lib as a new target to the existing framework saved me a lot of manual work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.