Dealing with a renamed XCFramework and binary compatibility

Suppose you distribute your XCFramework, YourFramework, which has another XCFramework, OldFramework, as a dependency. The OldFramework.framework has been recently renamed to NewFramework.framework. Now if you recompile YourFramework against NewFramework, the swiftinterface file changes. For example:

var magic: OldFramework.Magic

func start(_ time: OldFramework.Time)

becomes:

var magic: NewFramework.Magic

func start(_ time: NewFramework.Time)

Note: In the swiftinterface file the module name is added to the types.

And it breaks the binary compatibility of YourFramework (You have to recompile all the clients of the YourFramework).
Is there any solution to maintain the binary compatibility of YourFramework?

One obvious solution is deprecating any API that is dependent on the OldFramework. For example:

var magic: OldFramework.Magic
var newMagic: NewFramework.Magic

func start(_ time: OldFramework.Time)
func start(_ time: NewFramework.Time)

But knowing that except for the name of the module, the NewFramework is binary compatible, I'm wondering if there is any other solution to maintain the binary compatibility of YourFramework.

Terms of Service

Privacy Policy

Cookie Policy