-
Notifications
You must be signed in to change notification settings - Fork 0
Using Carthage with Xcode 10.1
If you are using Carthage in lieu of Cocoapods, and you are also stuck behind on Xcode 10.1 due to ABI issues with another dependency, you will need to do a few extra steps to get things working.
You can use Carthage as you normally would, that is, add the following to your Cartfile:
github "https://github.com:RoverPlatform/rover-campaigns-ios" ~> 3.0.1
However, you need to do a couple of extra things in order to successfully run carthage update
.
- Create an Xcode configuration file to override the Swift language version back to 4.2. Create it in your project directory, perhaps naming it something like
xcode10_1.xcconfig
. Its contents need only be:
SWIFT_VERSION=4.2
- Do a carthage update, but specifying the following extra environment variables:
XCODE_XCCONFIG_FILE=`pwd`/xcode10_1.xcconfig carthage update --platform ios --verbose
As you can see, it is important that the xcconfig file path be specified with an absolute path, not a relative one.
Note that this is assuming you have Xcode 10.1 set as your default toolchain (either by being the only installed Xcode or by you using xcode-select
to change it globally). However, you may also use the DEVELOPER_DIR
environment variable to specify it for just the single command.