Search code examples
delphifiremonkey

How to test the type of an Objective-c Object ? something similar to is with Object?


How to test the type of an Objective-c Object ? something similar to is with TObject? To cast we have wrap but I don't find how to test


Solution

  • I remembered that I'm actually using object_getClass in my own code :-)

    This is an example from DW.Notifications.iOS.pas :

    if request.trigger.isKindOfClass(objc_getClass('UNPushNotificationTrigger')) then