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.2.4 cannot be imported by the Swift 5.3 compiler on Xcode 12 #1106

Closed
das-palash-appsbee opened this issue Sep 20, 2020 · 13 comments

Comments

@das-palash-appsbee
Copy link

das-palash-appsbee commented Sep 20, 2020

Description

Previously I was using Xcode 11.6 to build these frameworks using Carthage. Now I upgraded Xcode to 12 and after building these frameworks when I integrate into my project and tried to run, it shows an error like:

Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3 compiler

Steps to Reproduce

  1. update your Xcode version to 12.0
  2. Build framework using Carthage carthage update --platform iOS (version 5.0.0)
  3. Add Buy.framework and Pay.framework into any project
  4. Run the project

Actual Error:

/Users/John/Desktop/Shopify Demo/API/ClientQuery.swift:4:8: Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3 compiler: /Users/John/Desktop/Shopify Demo/Shopify Demo/Buy.framework/Modules/Buy.swiftmodule/x86_64-apple-ios-simulator.swiftmodule

Workarounds I tried:

  1. So few workarounds like this where 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 neccessary .swiftinterface files which are the key to future compilers being able to load your old library. But it didn't solve the issue.
  2. Next I tried this Carthage workaround where you need to tweak the EXCLUDED_ARCHS statement. But it also failed.

Versions

  1. Xcode v 12.0 (12A7209)
  2. Carthage v 0.36.0
  3. Shopify mobile-buy-sdk-ios v 5.0.0
@SocialKitLtd
Copy link

Same issue here

@SatishMavani
Copy link

Same Issue

1 similar comment
@uncleRX
Copy link

uncleRX commented Sep 22, 2020

Same Issue

@Imanmf
Copy link

Imanmf commented Sep 23, 2020

same issue

@anama777
Copy link

Same issue

@vixdug
Copy link
Contributor

vixdug commented Sep 23, 2020

Thanks for the feedback. We are looking into this - no more reports needed at this time.

@dbart01
Copy link
Contributor

dbart01 commented Sep 29, 2020

This is now fixed in v5.1.0! We also recommend to use Swift Package Manager for managing this dependency.

@dbart01 dbart01 closed this as completed Sep 29, 2020
@DanGDroid
Copy link

try deleting Derived Data and build again

@newtest-cjt
Copy link

same question

@Imanmf
Copy link

Imanmf commented Oct 28, 2020

I had this issue and some issue more. So I decide to migrate to cocoapod.
I am using cocoapod now and I have not any problem.
I suggest you to migrate to cocoa pod guys

@dbart01
Copy link
Contributor

dbart01 commented Oct 28, 2020

Use SPM instead.

@bunyod0210
Copy link

try deleting Derived Data and build again

this helped me in Xcode 12 thanks

@Ganux1
Copy link

Ganux1 commented Mar 17, 2021

Came across this one:
Alamofire/Alamofire#3280

Thought it could be helpful for someone...

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