2

After updating to Xcode 11.5, I cannot import My Universal framework. Basically, I have created one framework and also generated the universal framework. The framework was compiled in the lower version of Swift (Swift 5.1). It worked fine previously. While importing the same framework in the same project in XCode 11.5 (Swift 5.2), it throws the following error.

Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.2.4 compiler I have already marked the Build Libraries for Distribution to Yes and Skip Install to No.

Please help. Thank you in advance!

8
  • So, what you are trying to do is an XCFramework that is build with Swift 5.1 compiler and can be imported to a Swift 5.2 project? Compiling the XCFramework with Swift 5.2 compiler is not an option? Commented Aug 14, 2020 at 9:55
  • If you are trying to make a simple Framework, maybe the comments of this answer can help stackoverflow.com/a/58656323/6791677 Commented Aug 14, 2020 at 10:05
  • 1
    @gcharita, Thank you for the reference link. I have done the BUILD_LIBRARY_FOR_DISTRIBUTION = YES; in my universal framework. But it is not working. I have compiled it in swift 5.2 but not able to use in swift 5.1. Please note, I'm not creating XCFramework. I'm creating framework only. Commented Aug 15, 2020 at 10:06
  • Interesting. I tried the same exact thing and seems to work correctly. I used Xcode 11.2.1 for exporting my framework. (imported in an Xcode 11.6 project) What Xcode version are you using to export your framework? Commented Aug 15, 2020 at 12:36
  • @gcharita, I'm using XCode 11.5 for exporting my framework. I'll be grateful to you if you are sharing a sample with me (Both Framework & Sample Project). It also helps me to match with my code. Commented Aug 15, 2020 at 16:46

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.