Swift framework problems with Xcode compatibility

2019-08-17 08:17发布

I have a framework that I distribute to customers without giving them access to the source code, depending on which version of Xcode I use to build it, they get errors like module compiled with Swift 4.1 cannot be imported in Swift 3.2.3 when importing the file . I couldn't find any setting in the project that allowed me to build backwards compatible version of my framework. Specifically the problem is between 9.2 and 9.3, but at the same time this seems to be a common problem, how can I build the framework so that it works with all the previous versions of Xcode?

1条回答
相关推荐>>
2楼-- · 2019-08-17 08:50

Until Swift 5 is released with ABI stability, your library has to be compiled with the same version of Swift as the parent app. This means multiple copies out there based on Swift / Xcode version.

Once Swift 5 is released, then you can compile a copy to be used in any app compiled with Swift 5 or greater.

查看更多
登录 后发表回答