Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Creator 4.0.2 + Xcode Version 8.1 (8B62) Build for iOS fails

Qt Creator 4.0.2 + Xcode Version 8.1 (8B62) Build for iOS fails

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 3 Posters 3.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tavis
    wrote on 17 Nov 2016, 01:17 last edited by
    #1

    Not sure if this is well known or not and wether there is a work around but I am unable to build and deploy to an iOS device or the simulator from within Qt5.7 (Creator version 4.0.2) and Xcode Version 8.1

    As for the simulator, no selectable devices show up in the Project Run Settings -> Device Type.

    Under Preferences->Build&Run->Kits, iphonesimulator-clang Qt 5.7.0 for iOS shows a warning "Device type is not supported by Qt version".

    Under Preferences->Build&Run->Qt Versions, Qt 5.7.0 for iOS shows a warning "Not all possible target environments can be supported due to missing compilers"

    However, Under Preferences->Devices, the iOS Simulator does show a green lit "Ready to Use".

    *The only way I can build an iOS project and deploy it to a device or the simulator is to run qmake from QtCreator and then open and run the project from within Xcode.

    Is there a known workaround to this issue?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      GTDev
      wrote on 17 Nov 2016, 09:37 last edited by GTDev
      #2

      Hi!
      Do you see any other errors when building the project from within Qt Creator?
      E.g. if you get this error with XCode 8:
      "Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild."
      you can have a look at the answers here to solve it: http://stackoverflow.com/questions/39544135/qt-does-not-work-since-xcode-8

      Also, did you set up the compilers/build kits manually or are they auto-detected? Maybe something went wrong there that can be fixed by deinstalling and reinstalling Qt for iOS with the MaintenanceTool. Qt Creator should auto-detect and setup the Kits after the installation. (Close Qt Creator during and reopen then after the installation)

      Best,
      Günther

      Senior Developer at Felgo - https://felgo.com/qt

      Develop mobile Apps for iOS & Android with Qt
      Felgo is an official Qt Technology Partner

      T 1 Reply Last reply 17 Nov 2016, 23:56
      0
      • G GTDev
        17 Nov 2016, 09:37

        Hi!
        Do you see any other errors when building the project from within Qt Creator?
        E.g. if you get this error with XCode 8:
        "Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild."
        you can have a look at the answers here to solve it: http://stackoverflow.com/questions/39544135/qt-does-not-work-since-xcode-8

        Also, did you set up the compilers/build kits manually or are they auto-detected? Maybe something went wrong there that can be fixed by deinstalling and reinstalling Qt for iOS with the MaintenanceTool. Qt Creator should auto-detect and setup the Kits after the installation. (Close Qt Creator during and reopen then after the installation)

        Best,
        Günther

        T Offline
        T Offline
        Tavis
        wrote on 17 Nov 2016, 23:56 last edited by
        #3

        @GTDev Yes I have been through that license agreement error and that page already. This is a different issue.

        When building for OS X , I get the following error:

        Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qsystemdetection.h:95:12: fatal error: 'TargetConditionals.h' file not found
        

        And I am able to resolve this problem by adding QMAKE_MAC_SDK = macosx1 .12 to my .pro file.

        But on iOS when I build for the simulator and select iPhone 6 as a device type, I get:

        xcodebuild: error: Unable to find a destination matching the provided destination specifier:
        		{ id:12.9 inch }
        Unsupported device specifier option.
        The device “My Mac” does not support the following options: id
        Please supply only supported device specifier options.
        

        And when I build for an actual device (iPhone 6 Plus) I get:

        Signing for "ExampleApp"  requires a development team. Select a development team in the project editor.
        Code signing is required for product type 'Application' in SDK 'iOS 10.0'
        

        So I have to open the project in Xcode and select a team and then build directly from there.

        T 1 Reply Last reply 18 Nov 2016, 00:06
        0
        • T Tavis
          17 Nov 2016, 23:56

          @GTDev Yes I have been through that license agreement error and that page already. This is a different issue.

          When building for OS X , I get the following error:

          Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qsystemdetection.h:95:12: fatal error: 'TargetConditionals.h' file not found
          

          And I am able to resolve this problem by adding QMAKE_MAC_SDK = macosx1 .12 to my .pro file.

          But on iOS when I build for the simulator and select iPhone 6 as a device type, I get:

          xcodebuild: error: Unable to find a destination matching the provided destination specifier:
          		{ id:12.9 inch }
          Unsupported device specifier option.
          The device “My Mac” does not support the following options: id
          Please supply only supported device specifier options.
          

          And when I build for an actual device (iPhone 6 Plus) I get:

          Signing for "ExampleApp"  requires a development team. Select a development team in the project editor.
          Code signing is required for product type 'Application' in SDK 'iOS 10.0'
          

          So I have to open the project in Xcode and select a team and then build directly from there.

          T Offline
          T Offline
          Tavis
          wrote on 18 Nov 2016, 00:06 last edited by
          #4

          @Tavis If I switch to Xcode 7.3 I can then build and run in the Simulator but I cannot deploy to a device running the latest iOS 10.

          SO what I am doing now is developing in Xcode 7.3 so I can run in the simulator and os x and then when I want to run it on an actual device, I switch to Xcode 8.1, run Qmake, open the project in Xcode 8.1 and then build and run on the device.

          S 1 Reply Last reply 26 Nov 2016, 04:02
          0
          • T Tavis
            18 Nov 2016, 00:06

            @Tavis If I switch to Xcode 7.3 I can then build and run in the Simulator but I cannot deploy to a device running the latest iOS 10.

            SO what I am doing now is developing in Xcode 7.3 so I can run in the simulator and os x and then when I want to run it on an actual device, I switch to Xcode 8.1, run Qmake, open the project in Xcode 8.1 and then build and run on the device.

            S Offline
            S Offline
            SeventhSin
            wrote on 26 Nov 2016, 04:02 last edited by
            #5

            @Tavis

            Using Qt Creator 4.1.0 here, Xcode 8.1 on OSX El Capitan (10.11.6). Haven't been able to deploy to iOS device nor to iOS simulator from Qt Creator either. What I do is run qmake to generate a .xcodeproj and then build/deploy from Xcode directly.

            Problem:

            xcodebuild: error: Unable to find a destination matching the provided destination specifier:
            { id:12.9 inch }

            Solution:

            Assuming you have Qt installed on your disk in the following location "/Development/Qt/5.7"

            nano /Development/Qt/5.7/ios/mkspecs/macx-ios-clang/xcodebuild.mk

            comment out this line:

            IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell xcrun simctl list devices | grep -E 'iPhone|iPad' | grep -v unavailable | perl -lne 'print $$1 if /((.*?))/' | tail -n 1)"

            and add this one instead:

            IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell xcrun simctl list devices | grep -E 'iPhone|iPad' | grep -v unavailable | awk 'match ($$0, /(([A-F0-9-]*))/ ) { print substr ($$0, RSTART+1, RLENGTH-2) }' | tail -n 1)"

            Problem:

            Signing for "ExampleApp" requires a development team. Select a development team in the project editor.
            Code signing is required for product type 'Application' in SDK 'iOS 10.0'

            Solution:

            1. Fire up Qt Creator, open your project, right click it and select "Run qmake" on it.

            2. In Xcode, navigate to you project's folder and open the .xcodeproj file qmake just generated.

            3. Once the project is loaded in Xcode, click on your project (left pane) and the Project Editor should be active in the right pane now. It has the following options: "General" "Capabilities" "Resource Tags" "Info" "Build Settings" "Build Phases" "Build Rules".

            4. In "General" - Signing section check "Automatically manage signing" and click on the "Team" dropdown menu. Select "Add account " and use your Apple Id. After you do that, the "Team" dropdown will contain a default team linked to your account. Select it to deploy to your devices.

            I hope that was of help and not too confusing, since I'm quoting from memory now.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              Tavis
              wrote on 7 Dec 2016, 02:39 last edited by
              #6

              I tried replacing this:

              IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell xcrun simctl list devices | grep -E 'iPhone|iPad' | grep -v unavailable | perl -lne 'print $$1 if /((.*?))/' | tail -n 1)"
              
              

              with this:

              IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell xcrun simctl list devices | grep -E 'iPhone|iPad' | grep -v unavailable | awk 'match ($$0, /(([A-F0-9-]*))/ ) { print substr ($$0, RSTART+1, RLENGTH-2) }' | tail -n 1)"
              

              But I now get the following error:

              xcodebuild: error: missing value for key 'id' of option 'Destination'
              
              

              The problem is there is no device list appearing in the popup menu under the simulator run settings..

              Your work around for deploying to an actual device is what I am already doing.. That is the issue I was initially reporting.. The problem I have with that is every time I rebuild the project I have to reopen the xcodeproj and reselect my account as the "Team" and run within Xcode. Each build wipes out the team selection for signing.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved