November 2013
Beginner
325 pages
9h 47m
English
The Runtime is responsible for keeping track of which classes you’re using, as well as those being used by the libraries and frameworks included in your application. There are a number of functions that exist in order to manipulate the classes loaded by the Runtime.
Create a new Foundation Command Line Tool named ClassAct.
In main.m, update the main function with the following code. Make sure you import objc/runtime.h at the top.
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
int main(int argc, const char * argv[])
{
@autoreleasepool {
// Declare a variable to hold the number of registered classes
unsigned int classCount = 0;
// Get a pointer to a list of all registered ...Read now
Unlock full access