Build Libraries For Distribution flag usage

I want to build an ios .xcframework (for external delivery) and .framework(for internal debugging) in order to package some code to a customer for incorporation into their app.

My framework has a dependency upon RealmSwift, which I've added using SPM.

There is a warning saying

Module RealmSwift was not compiled with library evolution support.

And when building SwiftVerifyEmittedModuleInterface fails with an error saying

"missing required modules: 'Realm.Private', 'Realm', 'Realm.Swift'"

By default, Build Libraries For Distribution was set to YES, however if I turn it off then the warning and error go away and I can cleanly build the framework.

I've been attempting to get a good understanding of this flag and if it should be used or not, most material says yes but doesn't go a good job of explaining why.

However anyway I can't get the framework to build with RealmSwift as a dependency without turning off this flag. Therefore is that ok to proceed down that route? Does the fact the xcframework will only ever be distributed to one consumer affect decisions (i.e. binary compatibility etc.)

Thanks

Build Libraries For Distribution flag usage
 
 
Q