Problem
I am developing a Framework (let's name it MyFramework
) which I want to use in a host iOS application. MyFramework
depends on several other 3rd party libraries (Alamofire
, ZIPFoundation
, etc.) which I have added as Swift Package Manager dependencies in the MyFramework
project.
After creating MyFramework.xcframework
and adding it to the host iOS application, I get a compilation error saying No such module 'Alamomfire'
. As suggested in this thread I have added Alamofire
as SPM dependency in the host iOS Application as well, which resolves the compilation error. But during runtime I get a console message saying Class _TtC9Alamofire21CompositeEventMonitor is implemented in both <HOME>/Library/Developer/Xcode/DerivedData/DevSample-frwzbtlatwjedobzfossixhbtork/Build/Products/Debug-iphonesimulator/MyFramework.framework/MyFramework (0x10346eb98) and <HOME>/Library/Developer/CoreSimulator/Devices/D17DA122-DB76-4447-B8FD-14FC8405A856/data/Containers/Bundle/Application/F68CBE06-CC7F-40AA-ACA8-2210048CA495/DevSample.app/DevSample (0x102ed31f8). One of the two will be used. Which one is undefined.
Questions
Is this expected behavior? As mention in this Apple Doc creating Umbrella Frameworks is discouraged. How to get rid of those runtime warnings/errors then?