Include dependencies when distributing a framework?


I am struggling to find a way to include dependencies of my framework when integrating it into a separate app. My scenario: MainFramework imports another framework (JOSESwift). I would like to distribute MyFramework.framework so clients can just drag and drop my framework file into their apps, import MyFramework and use my public methods/classes.

Is it possible to:

  • Avoid the clients having to integrate the dependencies to their app? So they are automatically included in my .framework file?
  • Hide the dependencies' methods/classes from the client? (Not necessary but a nice-to-have)

All the tutorials I have read do not work for me when the app (which imports MyFramework) builds. It will either not compile ('cannot find module for [dependant framework]') or crash on app startup ('library not found for [dependant framework]').

Any help would be much appreciated, thank you!