0

I have a framework "A", framework "B" and a host app.

In the framework "A" I have some methods what I want to run IF the framework "B" is existing in the host app. How can I achieve that?

I tried this:

#if __has_include(<Framework_B/Framework_B.h>)

but it does not work. Framework "A" does not see the framework "B".

John Doe
  • 139
  • 6
  • You tagged this `swift`, but your question is in ObjC. You will need to use weak linking to determine if some particular function is available. https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html Alternately, you can look for classes: https://stackoverflow.com/questions/24591952/how-do-i-do-weak-linking-in-swift – Rob Napier Dec 26 '22 at 14:22

0 Answers0