Change Carthage Swift version

前端 未结 2 1205
眼角桃花
眼角桃花 2020-12-14 01:24

Is it possible to change Carthage Swift version used to build the frameworks?

I\'m trying to migrate my project to swift 3 (on Xcode 8 beta), and the third party lib

2条回答
  •  粉色の甜心
    2020-12-14 02:19

    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 , --switch   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
    

    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
    

    Then to change it just run sudo xcode-select --switch /Contents/Developer

提交回复
热议问题