更改 Carthage Swift 版本 [英] Change Carthage Swift version
问题描述
是否可以更改用于构建框架的 Carthage Swift 版本?
Is it possible to change Carthage Swift version used to build the frameworks?
我正在尝试将我的项目迁移到 swift 3(在 Xcode 8 beta 上),第三方库是唯一阻止我的项目编译的东西.在为 swift 3 使用特定分支时,Carthage 会抛出有关新 Swift 语法的错误.
I'm trying to migrate my project to swift 3 (on Xcode 8 beta), and the third party libraries are the only thing that stops my project from compiling. While using specific branches for swift 3, Carthage throws errors about the new Swift syntax.
任何帮助将不胜感激!
推荐答案
Carthage 使用命令行工具 xcodebuild
来构建框架.命令行系统使用的Xcode版本由工具xcode-select
Carthage uses the command line tool xcodebuild
to build the frameworks. The version of Xcode used by the command line system is determined by the value selected by the tool xcode-select
Usage: xcode-select [options]
Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example,
xcodebuild) as well as the BSD development commands (such as cc and make).
Options:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s <path>, --switch <path> set the path for the active developer directory
--install open a dialog for installation of the command line developer tools
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path
它需要指向 Developer SDK 目录,因此您可以使用 --print-path
来检查它当前指向的位置.
It needs to point to the Developer SDK directory, so you can use --print-path
to check where it's currently pointing.
xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
然后更改它只需运行 sudo xcode-select --switch
这篇关于更改 Carthage Swift 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!