Snapkit: Unable to build on XCode 11

Created on 9 Aug 2019  路  3Comments  路  Source: SnapKit/SnapKit

New Issue Checklist

  • [x] I have looked at the Documentation
  • [x] I have read the F.A.Q.
  • [x] I have filled out this issue template.

Issue Info

Info | Value |
-------------------------|-------------------------------------|
Platform | iOS 13.0
Platform Version | 13.0
SnapKit Version | 5.0.1
Integration Method | carthage
XCode | 11.0 beta 5

Issue Description

Hello, I'm unable to build my app due to SnapKit on XCode 11 beta 5 with an error message Module compiled with Swift 5.0.1 cannot be imported by the Swift 5.1 compiler: /Users/...../SnapKit.swiftmodule/x86_64.swiftmodule

I saw this pull request https://github.com/SnapKit/SnapKit/pull/615/ for the latest version 5.0.1, hence assumed the effort to support XCode 11.

Most helpful comment

Fixed it by running
sudo xcode-select -s /Applications/Xcode-beta.app

Then run carthage update
carthage update --platform iOS

thanks @Mazyod

All 3 comments

I would love to see this too, I'm pretty much stuck now and can't work on any features for iOS 13. Anyone knows a workaround for this maybe?

If you have multiple Xcode versions installed, double check which version is xcodebuild using by running xcode-select -p. It needs to be pointing to Xcode beta for Carthage to use that for building the framework for Swift 5.1.

In order to switch it to Xcode beta, either use:

sudo xcode-select --switch /Applications/Xcode-beta.app

or simply switch it from Xcode preferences.

Fixed it by running
sudo xcode-select -s /Applications/Xcode-beta.app

Then run carthage update
carthage update --platform iOS

thanks @Mazyod

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Cookiezby picture Cookiezby  路  8Comments

semiwhale picture semiwhale  路  3Comments

phongle6893 picture phongle6893  路  4Comments

chengkaizone picture chengkaizone  路  3Comments

jagdish24 picture jagdish24  路  3Comments