2016-06-16 8 views
9

Можно ли изменить версию Carthage Swift, используемую для построения каркасов?Change Carthage Swift version

Я пытаюсь перенести свой проект на swift 3 (на бета-версию Xcode 8), а сторонние библиотеки - это единственное, что не позволяет компиляции моего проекта. При использовании определенных ветвей для быстрого 3, Карфаген выдает ошибки в отношении нового синтаксиса Swift.

Любая помощь будет оценена!

ответ

19

Карфаген использует инструмент командной строки xcodebuild для создания фреймворков. Версия Xcode используется системой командной строки определяется значением выбранного инструмента 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 

Необходимо указать на каталог SDK разработчика, так что вы можете использовать --print-path, чтобы проверить, где он в данный момент указывает.

xcode-select --print-path 
/Applications/Xcode.app/Contents/Developer 

Затем, чтобы изменить это просто запустить sudo xcode-select --switch <path-to-beta-xcode>/Contents/Developer

+1

Вы также можете изменить это с помощью Xcode> Preferences> Locations, а затем «Command Line Инструменты" –