Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module compiled with Swift 5.3 cannot be imported by #1

Open
MoElnaggar14 opened this issue Feb 23, 2021 · 0 comments
Open

Module compiled with Swift 5.3 cannot be imported by #1

MoElnaggar14 opened this issue Feb 23, 2021 · 0 comments

Comments

@MoElnaggar14
Copy link

You need to set the Build Libraries for Distribution option to Yes in your framework's build settings, otherwise, the swift compiler doesn't generate the necessary .swiftinterface files which are the key to future compilers being able to load your old library.

This ends up in your project.pbxproj file as:

BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
After setting this flag, a framework I compiled using Xcode 11.0 (swift 5.1) was able to be used by Xcode 11.2 (swift 5.1.2) and everything appears to be working correctly.

If the error still persists go to Product > Clean Build Folder and Build again.

Turns out if you watch the WWDC video, they explain it: https://developer.apple.com/videos/play/wwdc2019/416/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant