Building a binary framework for distribution still results in incompatibilities

I'm building a binary framework in Xcode 13.1 and expecting it to work in Xcode 12.5.1. I have BUILD_LIBRARY_FOR_DISTRIBUTION=Yes but the generated swift interface still references the Concurrency library (as import _Concurrency) because my framework contains UIViewController instances (and iOS 15 SDK now marks these with MainActor). Is there a way to build the framework so it's actually compatible with Xcode 12, have I missed some settings?

As an example, the generated swift interface contains:

...
import _Concurrency
...
@objc @objcMembers @_Concurrency.MainActor(unsafe) public class MyViewController : UIKit.UIViewController {

Any help appreciated.

John

Answered by DTS Engineer in 695387022

I'm building a binary framework in Xcode 13.1 and expecting it to work in Xcode 12.5.1.

That's the wrong expectation. For a discussion of this, please see my response in a different thread.

swift has hard code.

Accepted Answer

I'm building a binary framework in Xcode 13.1 and expecting it to work in Xcode 12.5.1.

That's the wrong expectation. For a discussion of this, please see my response in a different thread.

Good to know, thanks!

Building a binary framework for distribution still results in incompatibilities
 
 
Q