mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 11:42:30 +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! */
|
/* List of all plugins known to the plugin manager. Disabled plugins are also present! */
|
||||||
@property (readonly, copy) NSArray <MPPlugin __kindof*> *plugins;
|
@property (readonly, copy) NSArray <MPPlugin __kindof*> *plugins;
|
||||||
@property (nonatomic, readonly) BOOL loadUnsecurePlugins;
|
@property (nonatomic, readonly) BOOL loadUnsecurePlugins;
|
||||||
|
@property (readonly, copy) NSString *version;
|
||||||
|
|
||||||
+ (instancetype)sharedHost;
|
+ (instancetype)sharedHost;
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,11 @@ NSString *const MPPluginHostPluginBundleIdentifiyerKey = @"MPPluginHostPluginBun
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *)version {
|
||||||
|
NSString *version = NSBundle.mainBundle.infoDictionary[(NSString *)kCFBundleVersionKey];
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSArray<MPPlugin *> *)plugins {
|
- (NSArray<MPPlugin *> *)plugins {
|
||||||
return [self.mutablePlugins copy];
|
return [self.mutablePlugins copy];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user