My program has a class and that class has an +initialize method. I wonder who calls that method? The debugging tools are very unclear:

What triggers +initialize to be called? The beginning of application launch?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The runtime sends
initializeto each class in a program exactly one time just before the class, or any class that inherits from it, is sent its first message from within the program.See the documentation for
+ (void)initializeonNSObject.An authoritative blog post on the question of
initializestates thatinitializeis executed once when the class is first used, i.e. as the docs state before the class is sent its first message.