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 and iOS
Forum Updated to NodeBB v4.3 + New Features

Qt Creator and iOS

Scheduled Pinned Locked Moved Solved Mobile and Embedded
qt creatorios
17 Posts 2 Posters 6.5k Views 3 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    Since you are mixing both you're using Objective-C++ so is your file ending in mm ? Did you add it to OBJECTIVE_SOURCES in your pro file ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Leonardo
      wrote on last edited by
      #3

      Hi. Yes, I did. Here's part of my pro file:

      TEMPLATE = app
      
      QT += qml quick widgets
      
      SOURCES += mycontroller.cpp 
      HEADERS += mycontroller.h
      
      ios {
      
      	QMAKE_CXXFLAGS += -std=c++11 -stdlib=libc++ -F$$PWD/ios
      	QMAKE_LFLAGS += -stdlib=libc++ -F$$PWD/ios
      
      	OBJECTIVE_SOURCES += mycontroller_ios.mm
      
      	QMAKE_INFO_PLIST = ios/Info.plist
      
      	LIBS += -lz -framework UIKit -framework FBSDKCoreKit -framework FBSDKLoginKit
      
      }
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        Where's the Facebook SDK located ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • L Offline
          L Offline
          Leonardo
          wrote on last edited by
          #5

          Inside the ios folder. I already had a subfolder for the android tree, so I wanted to keep the pattern and created a subfolder for ios. As I said before, I can compile it, so I guess qmake is working properly.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            Sorry, I may have misunderstood your problem. Did you mean that the you "only" have problem with auto-completion and such with Qt Creator ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • L Offline
              L Offline
              Leonardo
              wrote on last edited by
              #7

              Yes. Check it out:

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by SGaist
                #8

                IIRC, you should rather have LIBS += -F $ $PWD/iOS (minus the spaces)

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  Leonardo
                  wrote on last edited by
                  #9

                  Compilation works, but the editor still highlights Objective-C code... =(

                  ios {
                  
                  	QMAKE_CXXFLAGS += -std=c++11 -stdlib=libc++
                  	QMAKE_LFLAGS += -stdlib=libc++
                  
                  	OBJECTIVE_SOURCES += mycontroller_ios.mm
                  
                  	QMAKE_INFO_PLIST = ios/Info.plist
                  
                  	LIBS += -lz -F$$PWD/ios -framework UIKit -framework FBSDKCoreKit -framework FBSDKLoginKit
                  
                  }
                  
                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    Did you try using the clang code model ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      Leonardo
                      wrote on last edited by
                      #11

                      Hi. What do you mean by that?

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        Qt Creator provides two code models (the beast that analyses your projects and provides all the nice stuff like auto-completion of your classes etc.) The default and the clang implementation that you can activate through the About Plugins menu.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • L Offline
                          L Offline
                          Leonardo
                          wrote on last edited by
                          #13

                          You nailed it!

                          For those interested:

                          http://doc.qt.io/qtcreator/creator-clang-codemodel.html

                          After enabling the plugin, go to

                          Preferences > C++ > Code Model

                          I changed both "Objective C" and "Objective C++" to clang. After that, the highlighting is gone.

                          It seems ok now. I can't test it properly, because I just upgraded to XCode 7 and broke Qt Creator's support for iOS, but it feels like to right solution.

                          Thank you.

                          1 Reply Last reply
                          1
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            What did break ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • L Offline
                              L Offline
                              Leonardo
                              wrote on last edited by
                              #15

                              Apparently, Qt Creator is not compatible with XCode 7 toolchain. After upgrading, the compiler for iOS went missing.

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #16

                                What version of Qt Creator are you using ? IIRC Qt Creator 3.5.1 and Qt 5.5.1 don't suffer from that problem.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • L Offline
                                  L Offline
                                  Leonardo
                                  wrote on last edited by
                                  #17

                                  I'm using Qt 5.5.0 with Qt Creator 3.4.2. Maybe that's why, but I've already came to terms with using XCode. It works fine.

                                  Thank you.

                                  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