I wanted to find out what classes for Objective-C and swift can be used with ObjCClass, such as SceneKit.
print_classlist.py
# Python3.6
# List the names of all loaded Objective-C classes.
import objc_util
count = objc_util.objc_getClassList(None, 0)
print( '%d classes found:' % count )
classes = (objc_util.c_void_p * count)()
count = objc_util.objc_getClassList(classes, count)
class_names = []
for cls in classes:
class_names.append(objc_util.class_getName(cls))
class_names.sort()
for b_name in class_names:
name = b_name.decode('utf-8')
#if not 'SCN' in name:
# continue
print(name)
print('finished.')
When you execute it, more than 30,000 class names will be printed, so I think it's a good idea to narrow it down appropriately.
Recommended Posts