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. Extending QIOSApplicationDelegate with category on ios
Qt 6.11 is out! See what's new in the release blog

Extending QIOSApplicationDelegate with category on ios

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 704 Views 1 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.
  • S Offline
    S Offline
    Sidharth M Nair
    wrote on last edited by
    #1

    Hi,

    Following a solution from an earlier thread (https://forum.qt.io/topic/46012/solved-how-to-extend-qiosapplicationdelegate-with-category-on-ios), I was able to extend the QIOSApplicationDelegate to have my own delegates get called during the startup flow. But after I have dealt with a lifecycle event, say OpenURL, I want to let the base QIOSApplicationDelegate continue to deal with it, similar to how a 'super' call works. Is there some way to achieve this? Essentially:

    #import "UIKit/UIKit.h"
    
    @interface QIOSApplicationDelegate
    @end
    
    @interface QIOSApplicationDelegate (WoboqApplicationDelegate)
    @end
    
    @implementation QIOSApplicationDelegate (WoboqApplicationDelegate)
    
    - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options
    {
    
    // Call SuperClass method from here - 
    
    // https://github.com/qt/qtbase/blob/dev/src/plugins/platforms/ios/qiosapplicationdelegate.mm
    
    }
    
    
    @end
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      From memory something like:

      return [super application: application, url, options];
      

      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
      • S Offline
        S Offline
        Sidharth M Nair
        wrote on last edited by
        #3

        I'm getting these following warnings while compiling:

        warning: 'UIResponder' may not respond to 'application:openURL:options:'
           return [super application:pApplication openURL:pURL options:pOptions];
        
        ld: warning: method '-application:openURL:options:' in category from /path to file/ overrides method from class in plugins/platforms/libqios_debug.a(qiosapplicationdelegate.mm.o)
        

        Are these Okay?

        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