Objective-C funtime - know your runtime

This is a talk I gave at UIKonf 2013. If you were there and you have got feedback, I’d love to hear it.

The basic idea was showing people some of the cool things that can be accomplished with the runtime API.

Here are the slides and here is the sample code.

An updated version was given at NSSpain in 2013. You can also download the introspection example and the swizzling example.

You can find my contact info here in case you have got follow-up questions. And yes, this page is kinda basic, sue me.

Some sources I used

https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html

http://www.friday.com/bbum/2009/12/18/objc_msgsend-part-1-the-road-map/ http://www.friday.com/bbum/2009/12/18/objc_msgsend-tour-part-2-setting-the-stage/ http://www.friday.com/bbum/2009/12/18/objc_msgsend-tour-part-3-the-fast-path/ http://www.friday.com/bbum/2010/02/04/objc_msgsend-tour-part-4-method-lookup-some-odds-and-ends/ http://www.friday.com/bbum/2011/03/17/ios-4-3-imp_implementationwithblock/

http://www.mikeash.com/pyblog/friday-qa-2009-03-13-intro-to-the-objective-c-runtime.html http://www.mikeash.com/pyblog/friday-qa-2009-03-20-objective-c-messaging.html http://www.mikeash.com/pyblog/friday-qa-2009-03-27-objective-c-message-forwarding.html http://www.mikeash.com/pyblog/friday-qa-2009-05-22-objective-c-class-loading-and-initialization.html http://www.mikeash.com/pyblog/friday-qa-2010-01-29-method-replacement-for-fun-and-profit.html http://www.mikeash.com/pyblog/friday-qa-2010-11-19-creating-classes-at-runtime-for-fun-and-profit.html

http://nshipster.com/type-encodings/ http://cocoasamurai.blogspot.de/2010/01/understanding-objective-c-runtime.html http://blog.metaobject.com/2009/01/simple-hom.html http://www.phrack.org/issues.html?issue=66&id=4 http://blog.lukhnos.org/post/17270947434/currying-objective-c-methods

http://sealiesoftware.com/blog/archive/2008/10/30/objc_explain_objc_msgSend_stret.html http://www.sealiesoftware.com/blog/archive/2008/11/16/objc_explain_objc_msgSend_fpret.html