22

Since Xcode 8 installation, i got this error when creating Qt Console Project:

Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.

I have re installed Qt and Qt Creator. I have read a lot of similar post, run xcode-select and stuff. This is crazy, there is nothing to do, still same error.

I am wondering what Qt exactly do with Xcode ?

(this is Qt 5.7)

Sami Kuhmonen
  • 30,146
  • 9
  • 61
  • 74
Bob5421
  • 7,757
  • 14
  • 81
  • 175
  • 3
    Did you, for example, try running that command and accepting the license agreement? – Sami Kuhmonen Sep 17 '16 at 07:39
  • 2
    [This topic](http://stackoverflow.com/questions/33728905/qt-creator-project-error-xcode-not-set-up-properly-you-may-need-to-confirm-t) describes the problem solution. – serg ogoltsov Sep 17 '16 at 08:16
  • Possible duplicate of [XCode 8 error "Project ERROR: Xcode not set up properly", even though the license has been accepted](http://stackoverflow.com/questions/39492617/xcode-8-error-project-error-xcode-not-set-up-properly-even-though-the-licens) – Violet Giraffe Oct 13 '16 at 06:40

4 Answers4

22

For the moment, untill Qt updates this is a fix:

Step 1:

Open the file:

<Qt installation folder>/5.7/clang_64/mkspecs/features/mac/default_pre.prf

Step 2:

Replace:

isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))

With:

isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))
Luca Angioloni
  • 2,243
  • 2
  • 19
  • 28
22

To avoid error 'Current iPhone SDK version (10.0) is too old. Please upgrade Xcode.' when building for iOS you need beside changing 'xcrun' to 'xcodebuild' (as says Luca Angioloni) also change minimum sdk version to "10.0". Open file:

<Qt installation folder>/5.7/ios/mkspecs/macx-ios-clang/features/sdk.prf

And replace:

lessThan(QMAKE_MAC_SDK_VERSION, "8.0"):

With:

lessThan(QMAKE_MAC_SDK_VERSION, "10.0"):

UPD: Qt 5.7.1 have already worked with xcode 8 well, just update your Qt to this (or higher) version

Community
  • 1
  • 1
Yevgeniy Logachev
  • 661
  • 1
  • 5
  • 11
8

Just to complete the answer of Yevgeniy Logachev, you have to use the solution of Luca but for the iOS path, if you want to compile for iOS devices :

<Qt installation folder>/5.7/ios/mkspecs/features/mac/default_pre.prf

doudouremi
  • 186
  • 1
  • 6
2

The answer from Luca is correct, this is a Qt bug and more details can be found here:

https://bugreports.qt.io/browse/QTBUG-55649

Including progress on the release/fix.

asj
  • 171
  • 1
  • 5
  • 2
    You may want to suggest this as an edit to the correct answer rather than adding another answer. See http://stackoverflow.com/help/how-to-answer – Alexander Morley Sep 18 '16 at 15:25