Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Desktop, MacOS, can't makeApplicationDelegate and compile
QtWS25 Last Chance

Qt Desktop, MacOS, can't makeApplicationDelegate and compile

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 172 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.
  • W Offline
    W Offline
    wesblake
    wrote on last edited by
    #1

    Hello all!
    So, we have a Qt Desktop application that needs to now have PushKit integrated for Voip notifications since Apple is pushing for apps to obey sleep, but it's a video relay app so we need to be able to get incoming calls.
    I've tried just about every combo based on this but for MacOS:
    https://github.com/gympulsr/qt-pushnotifications

    All of them give the same error when building the application.
    So, I stripped it down to the most base form (my mm file), baby steps, but still the same!

    Here is the current code in my mm:

    #include <AppKit/NSApplication.h>
    
    @interface QCocoaApplicationDelegate
    @end
    //add a category to AppDelegate
    @interface QCocoaApplicationDelegate (QPushNotificationDelegate)
    @end
    
    
    @implementation QCocoaApplicationDelegate (QPushNotificationDelegate)
    
    @end
    

    No matter what, I get the following output:

    /Users/<me>/OtherProjects/<our_project>/branches/build-<our_project>_Qt_5_15_1_clang_64bit-Release/pushnotifications.o:-1: error: Undefined symbols for architecture x86_64:
    "OBJC_CLASS$_QCocoaApplicationDelegate", referenced from:
    _OBJC$CATEGORY_QCocoaApplicationDelegate$_QPushNotificationDelegate in pushnotifications.o
    :-1: error: linker command failed with exit code 1 (use -v to see invocation)
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [<our_project>.app/Contents/MacOS/<our_project>] Error 1

    I'm going nuts! Any idea how I can properly use PushKit in a Qt Desktop app? Thanks!

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

      Hi,

      I am currently not sure you can do that easily. The QCocoaApplicationDelegate lives in the Cocoa QPA plugin. That's likely working on iOS because it's currently statically linked which is not the case here.

      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