extracted magic constant to acutal constant

This commit is contained in:
Michael Starke
2018-10-04 19:14:53 +02:00
parent 060d5c6b02
commit 6b00ca71de
2 changed files with 5 additions and 2 deletions

View File

@@ -29,6 +29,8 @@ NS_ASSUME_NONNULL_BEGIN
@class KPKAttribute;
@class KPKTree;
FOUNDATION_EXPORT NSString *const MPPluginUnkownVersion;
@interface MPPlugin : NSObject
@property (copy, readonly) NSString *identifier;
@@ -36,7 +38,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (copy, readonly) NSString *version;
@property (nonatomic, strong, readonly) NSBundle *bundle;
/**
If your plugin needs initalization override this method but you have to call [super initWithPluginHost:]
Otherwise your plugin might not get registered correctly

View File

@@ -26,6 +26,8 @@
#import "MPSettingsHelper.h"
#import "MPPluginConstants.h"
NSString *const MPPluginUnkownVersion = @"unkown.plugin.version";
@implementation MPPlugin
@synthesize bundle = _bundle;
@@ -80,7 +82,7 @@
return version;
}
}
return @"unknown.version";
return MPPluginUnkownVersion;
}