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. How to add iOS platform specific codes and libs to my project?

How to add iOS platform specific codes and libs to my project?

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 2 Posters 2.1k 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.
  • A Offline
    A Offline
    amahta
    wrote on last edited by
    #1

    Well, the title describes it all I think.
    As for an example, how can I add "UIImagePickerController.h" to my project.

    Thou shalt programme
    http://www.amin-ahmadi.com

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

      Hi,

      The same way you do it for framework on OS X. You have to use Objective-C/C++ for your code and the ios scope in your pro/pri 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
      • A Offline
        A Offline
        amahta
        wrote on last edited by
        #3

        Right, but can you please help me with a more specific example, like what should I exactly add to my *.pro file?
        I know that for OS X you need to add something like this:
        @
        LIBS += -framework
        @

        So according to your post, is it something like this or what?!?!
        @
        LIBS += -ios
        @

        Thanks

        Thou shalt programme
        http://www.amin-ahmadi.com

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

          No, the

          @LIBS += framework NameOfTheFrameWork@

          Is still the same.

          What you might need is

          @
          ios {
          OBJECTIVE_SOURCES += mycode.mm
          }
          @
          For you iOS only code if you have a common code base for several platforms

          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
          • A Offline
            A Offline
            amahta
            wrote on last edited by
            #5

            Still no luck.
            Is there any examples for Objective-C++ in Qt?
            For iOs maybe???

            Thou shalt programme
            http://www.amin-ahmadi.com

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

              You can have a look at the qtmacextras code to see how to do it

              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

              • Login

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