Adding iOS and macOS targets in Swift Package Manager

Hi, I have a library compiled individually for both iOS and macOS. I have added them as frameworks in Swift Package Manager of my project. Both work perfectly fine separately in project. But I want to add both the frameworks in the same project so that whenever I build the target for iOS it should pick the framework for iOS and when building for macOS it should pick the framework for macOS. Let me know if this can be done in SPM and if yes then how?

Adding iOS and macOS targets in Swift Package Manager
 
 
Q