Extending QIOSApplicationDelegate with category on ios
Unsolved
Mobile and Embedded
-
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
-
Hi and welcome to devnet,
From memory something like:
return [super application: application, url, options];
-
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?