mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 22:52:26 +00:00
extend Plugin host api to supply a version
This commit is contained in:
@@ -37,6 +37,7 @@ FOUNDATION_EXPORT NSString *const MPPluginHostPluginBundleIdentifiyerKey;
|
||||
/* List of all plugins known to the plugin manager. Disabled plugins are also present! */
|
||||
@property (readonly, copy) NSArray <MPPlugin __kindof*> *plugins;
|
||||
@property (nonatomic, readonly) BOOL loadUnsecurePlugins;
|
||||
@property (readonly, copy) NSString *version;
|
||||
|
||||
+ (instancetype)sharedHost;
|
||||
|
||||
|
||||
@@ -93,6 +93,11 @@ NSString *const MPPluginHostPluginBundleIdentifiyerKey = @"MPPluginHostPluginBun
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *)version {
|
||||
NSString *version = NSBundle.mainBundle.infoDictionary[(NSString *)kCFBundleVersionKey];
|
||||
return version;
|
||||
}
|
||||
|
||||
- (NSArray<MPPlugin *> *)plugins {
|
||||
return [self.mutablePlugins copy];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user