0
votes

I am facing this issue on Xcode 9.4.1 I tried with

github "Hearst-DD/ObjectMapper" ~> 3.1.0 //(tried with 3.3.0)

but this error.

Module compiled with Swift 4.2 cannot be imported in Swift 4.1.2 comes every-time.

I tried below things:

  • Deleting the .resolved file
  • Deleted the build and checkout folder
  • Deleted the framework folder from builds inside cathage

tried with carthage bootstrap --platform iOS.

Updated: Below error keep on coming.

Build Failed Task failed with exit code 65: /usr/bin/xcrun xcodebuild -workspace /Users/xx/Documents/tal1.14.1/Carthage/Checkouts/mixpanel-swift/MixpanelDemo/MixpanelDemo.xcworkspace -scheme Mixpanel -configuration Release -derivedDataPath /Users/xx/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/mixpanel-swift/v2.5.4 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/82/_m5xwhxx4795wyxlhtw40ch509_hqq/T/mixpanel-swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/xx/Documents/tal1.14.1/Carthage/Checkouts/mixpanel-swift)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/82/_m5xwhxx4795wyxlhtw40ch509_hqq/T/carthage-xcodebuild.2MxUDl.log BLDM3295-MAC:tal xx$

2

2 Answers

0
votes

You need to do carthage bootstrap --no-use-binaries to make Carthage compile the frameworks locally, using the Swift 4.2 compiler that your project uses.

0
votes

To fix what I did, I was having success build in Jenkins Server I kept the the same version and copied the build project and framework for the same. then run

carthage bootstrap platform iOS

I know this something hack, but this is how I am able to solve.