Answer the question
In order to leave comments, you need to log in
How (and is it possible in principle) to dig deeper into Objective-C frameworks than header files?
I'm interested in developing for IOS, but so far I can't quite understand the logic of the main frameworks.
I'm trying to track the life cycle of the application from entering the main function to didFinishLaunchingWithOptions, studying the header files. However, it is not clear, for example, where exactly the main event processing loop is installed, at what point the ViewController is connected, and many other small points. The source codes would be very helpful to me (but as I understand it, they are hardly available in the public domain, or am I wrong?) or good fresh literature that addresses these issues.
If you have something to share, please post links. Thank you all in advance.
Answer the question
In order to leave comments, you need to log in
The application lifecycle from entering the main() function to -didFinishLaunchingWithOptions: varies from system to system. That is why it is important to rely only on the information that is publicly available in Apple's documentation - they reserve the right to quietly change anything that is not described by them. This applies not only to this aspect, but to the entire behavior of the system.
You can explore, override methods (runtime allows almost anything in this sense), sit in the debugger, it's interesting after all. But if you rely on the results of your research rather than documented behavior, your product may stop working when a new system is released.
The gypsy tiptoed over to the chicken and yelled, “chick!”
If you are interested in an undocumented API, look for the Objective C private API.
A long time ago in a bookstore, I came across a book with a title like "Objective C. Open Source Application Development." Perhaps she could help you.
As for the guts, I recommend reading the documentation, it is deeper than it seems.
Read about RunLoop.
And if you need the insides: for any framework, you can find out what classes it has (even if the private API). To do this, read the objective-c runtime.
or a disassembler to help you. this is of course long but you can find it in the code
It is difficult to send you specifically to something, not knowing exactly what you are and for what (with what detail) you are interested.
But I want to remind you that there are two open source implementations of Cocoa - GNUStep and Cocotron. In their source codes you can find many answers and generally useful ones. This, of course, will not say that this is how Apple did it, but the general logic of work and how it can be implemented will be seen.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question