How to work with the AppDelegate, packaged into framework?

There is a project in Xcode that is based only on the framework which directly starts from .mm like this:

int main(int argc, char *argv[])
{
startApp(argc, argv);
}

AppDelegate works within the framework.
The framework itself has no header file, only the executable binary and the .plist
It does not give the opportunity to add to your class a link to the framework ( without header can't you ?)
Tried to use swizzling to override functions AppDelegate, but it does not work
it is evident from the fact that I reference the AppDelegate like so: [UIApplication class], and need likely the real class name. I found out the real name of the class inside the framework, but as a framework to connect to your class ?

The idea was to start from mm first, your AppDelegate, and then to run the framework, but do not know how to do it.

I would appreciate any ideas in what direction to dig ?
July 8th 19 at 16:44
1 answer
July 8th 19 at 16:46
Solution
Objc runtime.
The class can be obtained in this way if you know the name of the delegate.
Class appDelegate = objc_getClass("AppDelegate");

A list of strings in the framework can be accessed through the terminal
strings CocoaLumberjack/CocoaLumberjack.framework/CocoaLumberjack
I want to add push notifications to the project. For this we need to capture events, for example, didRegisterForRemoteNotificationswithdevicetoken, and this is possible only through the AppDelegate.

Towards runtime looked, but saw nothing :) Can you be more specific ? - Iliana_Heller commented on July 8th 19 at 16:49
: what project? Not for the first time see people whose application framework. - Ramona_Bednar64 commented on July 8th 19 at 16:52
The project allows you to build the app interface in your graphics editor. It is still closed for General use, not specifically, sorry. Thank you for the tip, I will try! - Iliana_Heller commented on July 8th 19 at 16:55

Find more questions by tags iOSObjective-C