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. [SOLVED] Include an iOS framework in QT header file

[SOLVED] Include an iOS framework in QT header file

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

    Hello ,I use qt5.3 on mac and i want to develop an application for iphone. I know how can i use objective c code in qt5.3. Now i want to use iOS UIViewController in qt header file.
    I have a bridge method in mainwindow.h to invoke a objective c++ method.
    //in mainwindow.h

    #include <UIKit/UIKit.h> //error come from here
    ...
    public:

    int bridgeMethodToCallObjectiveC(UIViewController *);
    

    ...

    I've put implementation of that method in .mm file.
    When i add #include <UIKit/UIKit.h> in header file to use UIViewController, i get this error:
    unknown type name 'nsstring' did you mean 'qstring'

    I've added LIBS += -framework UIKit in .pro file.
    how can i solve it?
    thanks in advance...

    Hasti Ranjkesh

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hasti66
      wrote on last edited by
      #2

      I solved it by myself.
      in mainwindow.h i changed the method signature and removed #include <UIKit/UIKit.h>
      public: int bridgeMethodToCallObjectiveC(void *);

      Hasti Ranjkesh

      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