Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtCreator - cannot add build kit



  • I want to test my qml app on my iphone, but i cannot add a build kit in QtCreator 3.
    In the Projects section, under Build & Run, in the Add Kit dropdown, i have 4 (auto-detected) kits, all of them greyed out, so unselectable;

    • iphoneos-clang Qt 5.2.1 (ios)
    • iphoneos-clang Qt 5.2.1 for iOS
    • iphonesimulator-clang Qt 5.2.1 (ios)
    • iphonesimulator-clang Qt 5.2.1 for iOS

    All of them display the following message when i mouse-hover:
    "Device type is not desktop."

    Can anyone point me in the right direction to solve this issue?
    Thanks in advance.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you setup Xcode correctly before installing Qt ?



  • Thanks for the welcome.

    I think i setup Xcode correctly ... i just installed it. Could you elaborate on "setting it up correctly"?
    I updated the iOS simulators in Xcode just now, but the problem in QtCreator remains.
    I updated the Qt components using MaintainanceTool.app , but that didn't help either.



  • OK, small update:
    I seem to have had two Qt SDK installations and have removed one, now i have two kits in the dropdown:

    • iphoneos-clang Qt 5.2.1 for iOS
    • iphonesimulator-clang Qt 5.2.1 for iOS

    Which makes sense, since they were autodetected.
    But the problem remains; both indicate that "Device type is not desktop." and are not selectable.


  • Lifetime Qt Champion

    Are you sure the device type of your kits are configured correctly ?



  • They are iOS Device and iOS Simulator respectively and greyed out, so unchangeable.


  • Lifetime Qt Champion

    Just realized you had several SDK installed. So I wonder if you don't have something that might have corrupted Qt Creator configuration file.

    I would recommend removing everything and re-install. Since you are going to develop for several platforms you should consider using the online installer, so you can install/update each version of Qt more easily



  • OK, will try, is there a sure way to know everything is gone besides grep?


  • Lifetime Qt Champion

    AFAIK, the uninstaller is pretty good at this. Also the Qt install is done in one folder so if there's something remaining then you can just delete that folder



  • Uninstalled, reinstalled with online installer. Same problem :(.
    Uninstalled and Xcode as well. No dice.

    Any other tips are welcome ...


  • Lifetime Qt Champion

    Did you also install the command line tools from Xcode ?



  • yes, Preferences > Locations > Command Line Tools: Xcode 5.1 (5B130a)


  • Lifetime Qt Champion

    What version of Qt Creator are you having ?



  • Qt Creator 3.0.1

    Based on Qt 5.2.1 (Clang 5.0 (Apple), 64 bit)

    Built on Jan 31 2014 at 06:00:56

    From revision 51af63bb9e


  • Lifetime Qt Champion

    Strange, everything looks fine. Can you check the state of the iOS plugin ?



  • 1/
    Current state: (green) Ready to use

    on both iphonesimulator and iphoneos when iphone is connected of course

    i also installed Kenneth Reitz's osx-gcc (https://github.com/kennethreitz/osx-gcc-installer/) but that didn't help.

    2/
    could it have something to do with Qt Creator/Qt licenses?


  • Lifetime Qt Champion

    Do you have a compiler setup for arm in the Compilers panel ?

    2/ AFAIK, no



  • Same issue here. iphoneos kit is automatically set when you create an example application, but not available (disabled) when you create new QtQuick 2.0 project.

    Qt Creator 3.0.1
    Based on Qt 5.2.1 (Clang 5.0 (Apple), 64 bit)



  • pfff, getting really frustrated; i thought some conflicting and badly administrated installs led up to this issue, so i re-installed my whole system (OS X Mavericks).
    I needed Qt4 for current projects, so installed that with MacPorts, then installed Qt5.2.1 and Qt Creator using the Online Installer.

    The exact same problem remains; i cannot add build kits to my project, the message "Device type is not desktop." shows when i hover both "iphoneos-clang Qt 5.2.1 for iOS" and "iphonesimulator Qt 5.2.1 for iOS" in the "Add Kit" dropdown, the options remain grey and unselectable.

    To answer your latest question SGaist: Yes, in the compilers tab, i can see iphoneos-clang with Platform codegen flags "-arch armv7".
    Would you like to see screenshots? I can provide them, just name the windows and tabs ... Thanks in advance, and thanks for the patience and guidance so far.



  • In QtCreator 3.0.1 the iOS plugin was still experimental, and was (in theory) activated for the creator iOS SDK.
    Any other creator will have it disabled unless you enable it from in Qt Creator > About Plugins...

    The problems described here look like not having the plugin enabled, and so not recognising the correct type of the device, and being able to use the kit.

    If the iOS plugin is enabled you should see iOS pane in the preferences (or in the plugins).



  • Thank you for your input fawzi.
    It confuses me though, what do you mean by "the creator iOS SDK"?

    I do see an iOS item in the preferences, it only has one checkbox "Ask about devices not in developer mode", which doesn't change my problem.

    In Plugins i see "Ios" under Device Support, with a checked checkbox and green checkmark in front ...

    Anyway, i downloaded Qt Creator 3.1, the problem remains exactly the same.



  • Sorry I cannot reproduce your issue.
    You might want to zip your preferences (~/.config/QtProject/qtcreator for the global ones, and *.pro.user for the project specific ones) and remove them to see if they are somehow corrupted (if that is the case please upload a copy of them so we can try to reproduce the problem)

    In theory it should work like this:

    • In Preferences>Build&Run>Qt versions you should have one or more Qt versions that are detected as "Qt 5.X.X for iOS" (when selecting them).

    • You can remove and manually add as many Qt as you want (just select the qmake of the correct Qt

    • after you apply the changes (or after closing) for each of these iOS Qt two kits should be generated iphone-* and iphonesimulator-* to build for a device or for the simulator.
      These devices should be ready to work, but you might clone them and change all parameters as you wish, or create a kit from scratch and set the correct Qt and device, sysroot,...

    Once the kits are set up you should be able to use them.
    (they should be 'black' in build & run).
    I hope this can help you to successfully set it up, and if you manage it it would be good to know why the automatic setup failed giving you such a bad experience...



  • Hmm, interesting, i had no project specific config (.pro) file like the examples did, only a .qmlproject file. Then i realised i didn't remember how i created the project in the first place ....

    So i started a new project with template Applications > Qt Quick Application , and in that wizard i could select the Kits.

    The app is not working in the simulator at the moment, but at least i can start it, so i suspect the problem's in the code now.

    To conclude, i guess i created the project in a way that prevented iOS support (?) It's still very confusing, but at least i'm making progress again.

    Thanks for you support and patience.



  • Ohh qmlproject project, that is a project that is just qml and call qmlview to execute it, but this approach cannot be used on a device like iOS as you always have to ship a full application, not documents+application that executes them.
    We should maybe explain that somewhere, I din't even think that you had such a project.
    We could actually support a qmlproject by generating an app behind the scenes, worth a thought for next release...



  • yeah, way to make me feel stupid! :p just kidding

    glad i can move on now


Log in to reply