Embedded Frameworks in Swift 4.1

I have a swift framework called Extensions that I embed in my applications. As the name implies, this framework provides a lot of commonly used extensions to Swift.


I have a 2nd swift framework called Utilities that I also embed in my applications. Again, commonly used Swift utilitiy classes, structs and methods.


Currently I am declaring the specific extensions I need to use in Utilities as fileprivate in the appropriate places in Utilities but I really hate the duplication.

All this works well but now I would prefer to have Utilities use these extensions directly from framework Extensions.


Is this possible without embedding a 2nd copy of Extensions within Utilities?

Answered by granada29 in 313210022

I was over thinking it. No need to embed Extensions into Utilities. Just link against. The rpaths are the same for both frameworks, so run-time linkage is just fine. Sorry for the noise.

Accepted Answer

I was over thinking it. No need to embed Extensions into Utilities. Just link against. The rpaths are the same for both frameworks, so run-time linkage is just fine. Sorry for the noise.

Embedded Frameworks in Swift 4.1
 
 
Q