Skip to content

Instantly share code, notes, and snippets.

@pookjw
Last active February 21, 2025 11:51
Show Gist options
  • Save pookjw/5471b44410e8c747d21b46797cc74ad1 to your computer and use it in GitHub Desktop.
Save pookjw/5471b44410e8c747d21b46797cc74ad1 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
@interface UTType (MyPrivate)
+ (void)_enumerateAllDeclaredTypesUsingBlock:(void (^)(UTType *type, BOOL *stop))block;
@end
UT_EXPORT NSArray<UTType *> *_UTGetAllCoreTypesConstants(void);
int main(int argc, const char * argv[]) {
@autoreleasepool {
for (UTType *type in _UTGetAllCoreTypesConstants()) {
NSLog(@"%@", type);
}
[UTType _enumerateAllDeclaredTypesUsingBlock:^(UTType *type, BOOL *stop) {
// *stop = YES;
NSLog(@"%@", type);
}];
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment