If you're using Xcode 11 onwards:
Go to General
tab and add the framework in Frameworks, Libraries, and Embedded Content
section.
Important: By default it might be marked as Do Not Embed
, change it to Embed Without Signing
like shown in the image and you are good to go.
For Xcode versions below 11:
Just add the framework in Embedded Binaries
section and you are done.
Cheers!