A
A
Alex Palm2016-06-04 22:27:58
Objective-C
Alex Palm, 2016-06-04 22:27:58

How to work with AppDelegate packaged in framework?

There is a project in Xcode that is based only on a framework that directly starts from .mm like this:
int main(int argc, char *argv[])
{
startApp(argc, argv);
}
AppDelegate works inside the framework.
The framework itself does not have a header file, inside there is only an executable binary and .plist.
This does not make it possible to add a link to the framework to your class (it’s impossible without a header?)
I tried to use swizzling to override the AppDelegate functions, but it doesn’t work,
apparently due to the fact that I refer to the AppDelegate like this: [UIApplication class], but most likely the real name of the class is needed. I dug out the real name of the class inside the framework, but how can I connect the framework to my class?
There was an idea to start your AppDelegate from mm first, and then start the framework, but I don’t know how to do it.
I would be grateful for any ideas - which way to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
ManWithBear, 2016-06-04
@palmoff

objc runtime.
The class can be obtained in this way if you know the name of the delegate.
The list of strings in the framework can be obtained through the terminal

strings CocoaLumberjack/CocoaLumberjack.framework/CocoaLumberjack

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question