objc_getProtocol() returns NULL for `NSApplicationDelegate"?
问题 I'm trying to use the objc_getProtocol() function to get a reference to the struct representing the NSApplicationDelegate protocol: Protocol *protocol = objc_getProtocol("NSApplicationDelegate"); However, for some reason, this always returns NULL . Other protocols such as NSObject , NSCoding , NSTableViewDelegate , and NSTableViewDataSource work fine. Is there something special about NSApplicationDelegate , or am I doing something wrong? 回答1: Found the answer in the Apple docs: http:/