Integrating third party libraries like GoogleMaps, Payment gateways in Custom SDK

Hello,

I’ve created a custom SDK from my iOS application to be integrated into another app. The SDK depends on Google Maps and payment gateway libraries. If I exclude these third-party libraries from the SDK, I encounter multiple errors. However, if I include them, the host app throws errors due to duplicate dependencies, since it already integrates the same libraries. I understand that third-party dependencies can be downloaded separately by adding them through Swift Package Manager (SPM). However, the issue is that if I exclude these dependencies from my SDK, I get compilation errors wherever I’ve used import GoogleMaps or similar statements in my code. Could you please guide me — or share documentation — on the correct approach to create an SDK that excludes third-party libraries?

Integrating third party libraries like GoogleMaps, Payment gateways in Custom SDK
 
 
Q