cross-language-cpp / djinni-generator

Command-line tool that generates gluecode from a djinni-IDL file
https://djinni.xlcpp.dev/djinni-generator/setup
Apache License 2.0
94 stars 19 forks source link

Objective-C generated objects should conform to NSObject protocol #117

Closed ngmeyer closed 3 years ago

ngmeyer commented 3 years ago

See best practices document from Apple here: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html

As an example not conforming to NSObject protocol results in build errors if we attempt to get the class from the protocol e.g.:

for (id thing in things) { NSString *className = NSStringFromClass([thing class]); // build error ... }

a4z commented 3 years ago

Since the PR was merged, we can close that issue as solved