There’s a objc class in iOS’ private framework UIKitCore.framework/_UIDefinitionDictionary.h
I want to use. The headers are:
#import <objc/NSObject.h>
@class MAAsset, NSString;
__attribute__((visibility("hidden")))
@interface _UIDefinitionDictionary : NSObject
{
struct __DCSDictionary *_dictionary;
_Bool _activated;
MAAsset *_rawAsset;
NSString *_definitionLanguage;
MAAsset *_assetToUpgrade;
}
+ (id)_normalizedLanguageStringForLanguageCode:(id)arg1;
- (void).cxx_destruct;
@property(retain) MAAsset *assetToUpgrade; // @synthesize assetToUpgrade=_assetToUpgrade;
@property _Bool activated; // @synthesize activated=_activated;
@property(readonly) NSString *definitionLanguage; // @synthesize definitionLanguage=_definitionLanguage;
@property(readonly) MAAsset *rawAsset; // @synthesize rawAsset=_rawAsset;
- (id)description;
- (_Bool)_isTTYDictionary;
- (id)_definitionValueForTerm:(id)arg1;
- (id)_attributedDefinitionForTerm:(id)arg1;
- (id)_fullHTMLDefinitionForTerm:(id)arg1;
- (id)_shortHTMLDefinitionForTerm:(id)arg1;
- (id)_HTMLDefinitionForTerm:(id)arg1 type:(long long)arg2;
- (_Bool)_hasDefinitionForTerm:(id)arg1;
@property(readonly) NSString *localizedDictionaryName;
@property(readonly) NSString *localizedLanguageName;
- (void)dealloc;
- (_Bool)assetIsDeletable;
- (_Bool)assetIsLocal;
- (void)updateAsset;
- (id)initWithAsset:(id)arg1;
@end
I know how to get the class:
let a = NSClassFromString("_UIDefinitionDictionary") as! NSObject.Type
But when I try to initialize it with:
let b = a.perform(Selector(("initWithAsset:")), with: rawAsset)
I get this error:
+[_UIDefinitionDictionary initWithAsset:]: unrecognized selector sent to class 0x1daed2890
What’s the correct way to do it?