Swift native base class or NSObject

Swift classes that are subclasses of NSObject: are Objective-C classes themselves use objc_msgSend() for calls to (most of) their methods provide Objective-C runtime metadata for (most of) their method implementations Swift classes that are not subclasses of NSObject: are Objective-C classes, but implement only a handful of methods for NSObject compatibility do not use objc_msgSend() … Read more

Why doesn’t Objective-C support private methods?

The answer is… well… simple. Simplicity and consistency, in fact. Objective-C is purely dynamic at the moment of method dispatch. In particular, every method dispatch goes through the exact same dynamic method resolution point as every other method dispatch. At runtime, every method implementation has the exact same exposure and all of the APIs provided … Read more

How to write iOS app purely in C

Damn, it took me a while but I got it: main.c: #include <CoreFoundation/CoreFoundation.h> #include <objc/runtime.h> #include <objc/message.h> // This is a hack. Because we are writing in C, we cannot out and include // <UIKit/UIKit.h>, as that uses Objective-C constructs. // however, neither can we give the full function declaration, like this: // int UIApplicationMain … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)