IPhone API : adding methods to 3th party application delegate
-
28-09-2019 - |
Question
we are using a third 3 party library which comes with its own application delegate class.
In the main file of the of the application its initiating the
UIApplication object as follows :
retVal = UIApplicationMain(argc, argv, nil, @"3ThParty1AppDelegate");
Now, I don't have any source code of the app delegate class but I need to add methods for background processing and push notifications. Would it be possible at all to add it ?
thanks so much,
Guenter
Solution
The obvious way is to create a category that contains the additional methods. However that won't cut it if you need to add properties as well. In that case you need to extend the app delegate class. I've literally just this minute done the same things with the unit test driver for GH Unit to add additional methods to it's app delegate and it's used exactly the same way.