I have a binary Swift xcframework which references two other open-source Swift frameworks (built from source).
My framework along with its dependencies are built with the
BUILD_LIBRARY_FOR_DISTRIBUTION option enabled (in order to support module stability).
This setup has worked fine for many years, but now when building my framework in Xcode 12.5 or above, I'm getting the following dyld error when an app using the framework is compiled in Xcode <12.5:
dyld: Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E
It is suggested here that this issue is being caused by the following warning apparently now causing this fatal error:
Using 'class' keyword for protocol inheritance is deprecated; use 'AnyObject' instead
I note that the affected dependency involved in my case (Starscream) has not yet changed the class keyword to AnyObject, however I have not (yet) verified this is definitely the cause.
Unfortunately there is very little documentation out there about this issue, but it seems like it could potentially be quite widespread and increasing in prevalence as people upgrade to Xcode 12.5+, and more binary frameworks are built against this new version.
Does anyone have any ideas about how this can be resolved/mitigated, other than downgrading to Xcode 12.4?