Crashes if classes inherit from NSObject.
If you try to reflect an instance of a class that inherits from NSObject, it will crash while accessing a null pointer when trying to reflect NSObject.
The minimal example would be:
class Foobar: NSObject {
var stringProperty: String = "foobar"
}
let instance = Foobar()
try! properties(instance)
I have an example traceback in the attached screenshot. I tried with Swift 3.3 and Swift 4.1.

I see that there's already a workaround in the superclass reflection where we exclude the SwiftObject superclass:
https://github.com/Zewo/Reflection/blob/1414e1215c505a8fb4f548661bf4a51903d3c4b5/Sources/Reflection/Metadata+Class.swift#L22
Would it make sense to exclude the NSObject superclass in the same way? Or is reflecting on classes inherited from NSObject in general not supported?
The same issue here..! Do you have any solutions?
@Lukas-Stuehrk @GRGBISHOW you two may want to look at https://github.com/wickwirew/Runtime it's a bit more maintained than this library and functions very similarly.
Thanks for the input, @robertjpayne. I had a look at Runtime before I reported the bug. It also crashes when objects inherit from NSObject.
I can provide a fix for this issue. It's just that it might be a surprising change, because it would simply stop to look for inherited properties from the NSObject superclass. That's why I wanted to discuss the issue first.
I can also report the issue at the Runtime project. But the fix looked much more complicated over there 😄.