Solved How to use QIOApplicationDelegate
-
Hi, from a lot of posts I found QIOApplicationDelegate in Src/qtbase/src/plugins/platforms/ios/qiosapplicationdelegate.h is the thing to use to achieve AppDelegate in iOS apps. My question is how to use it. I found people speaking about either category extending or subclassing. Will they both work?
Another more important question, after implementing the class, shall I create an instance of it in main.cpp?
Thanks all!
-
Hi and welcome to devnet,
It's not a class you usually subclass, it's a class used by the QPA which can change from a version of Qt to the other.
What do you need to subclass for ?
-
Hi @SGaist
I need it for handling the push notifications.
I kinda managed it by following @benlau 's approach.
https://github.com/benlau/quickios/blob/master/examples/quickiosexample/appdelegate.mmNow wondering if this is the appropriate way of doing it.
-
AFAIK, it is. I'd just check Qt's sources to see if the method is already implemented and is doing something.
-
@SGaist said:
AFAIK, it is. I'd just check Qt's sources to see if the method is already implemented and is doing something.
I have checked Qt source and it did nothing. That is why I suggest people to do so. However, I found that there has other library project that will override the method too. So, people should use at their own risks.
-
Thanks guys!