3lvis / Sync

JSON to Core Data and back. Swift Core Data Sync.
MIT License
2.55k stars 263 forks source link

Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2 compiler #576

Closed brandonpark closed 4 years ago

brandonpark commented 4 years ago

Hello @3lvis ,

With the latest Xcode I am getting the following error

Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2 compiler: /Users/brandonmccandlish/Downloads/Sync-master/iOSDemo/Carthage/Build/iOS/Sync.framework/Modules/Sync.swiftmodule/x86_64.swiftmodule

Any chance on an update for Swift 5.2?

olopsman commented 4 years ago

Running on Xcode 11.5 and the same issue.

Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2.4 compiler:

/Users/PauloOrquilo/Documents/Development/Mobile/Training/CoreData/Sync/iOSDemo/Carthage/Build/iOS/Sync.framework/Modules/Sync.swiftmodule/x86_64.swiftmodule

olopsman commented 4 years ago

Running on Xcode 11.5 and the same issue.

Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2.4 compiler:

/Users/PauloOrquilo/Documents/Development/Mobile/Training/CoreData/Sync/iOSDemo/Carthage/Build/iOS/Sync.framework/Modules/Sync.swiftmodule/x86_64.swiftmodule

I was able to resolve this by deleting the current frameworks in the project and rebuilding it. From the terminal go Cartfile location and run:

carthage update --platform IOS

Once done, on the Build/IOS folder drag and drop the .framework files to the project's General tab > Framework, Libraries and Embedded Content.

3lvis commented 4 years ago

Should be fixed in the latest release, if the problem persists please let me know.

badmunkey commented 4 years ago

I'm still getting this problem even with the suggestion by @olopsman . when i run the code suggested in terminal it says..

Skipped installing Networking.framework binary due to the error: "Incompatible Swift version - framework was built with 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1) and the local version is 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)."

Falling back to building from the source

A shell task (/usr/bin/xcrun xcodebuild -workspace /Users/munkey/Desktop/Sync-master/iOSDemo/Carthage/Checkouts/Alamofire/Alamofire.xcworkspace CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES -list) failed with exit code 72: xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH

badmunkey commented 4 years ago

I'm still getting this problem even with the suggestion by @olopsman . when i run the code suggested in terminal it says..

Skipped installing Networking.framework binary due to the error: "Incompatible Swift version - framework was built with 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1) and the local version is 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)."

Falling back to building from the source

A shell task (/usr/bin/xcrun xcodebuild -workspace /Users/munkey/Desktop/Sync-master/iOSDemo/Carthage/Checkouts/Alamofire/Alamofire.xcworkspace CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES -list) failed with exit code 72: xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH

after a lot of Googling I figured out the reason I was having some trouble was because the last time i reinstalled homebrew I didn't set my command line tools to Xcode 11.6 under my Xcode -> Preferences -> Locations

Once I updated my command line tool preference which was empty .. big OOF, then I ran the suggested code in terminal and it worked for me.

suggested code:

carthage update --platform IOS

After I ran the code I was able to update the file to a newer version of swift automatically through Xcode's auto help thing.

3lvis commented 4 years ago

I'm glad you got a fix for this, thanks for sharing @badmunkey