diff --git a/src/HITDevKit/HITDevKit.xcodeproj/project.pbxproj b/src/HITDevKit/HITDevKit.xcodeproj/project.pbxproj index 33a33b9..280f617 100644 --- a/src/HITDevKit/HITDevKit.xcodeproj/project.pbxproj +++ b/src/HITDevKit/HITDevKit.xcodeproj/project.pbxproj @@ -203,7 +203,7 @@ E1B2C8C81B59351B005A9936 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; TargetAttributes = { E1B2C8D01B59351B005A9936 = { @@ -315,12 +315,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -369,12 +371,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -406,7 +410,7 @@ E1B2C8E81B59351B005A9936 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; @@ -428,7 +432,7 @@ E1B2C8E91B59351B005A9936 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; diff --git a/src/HITDevKit/HITDevKit/HITPeriodicPlugin.m b/src/HITDevKit/HITDevKit/HITPeriodicPlugin.m index fc0e8c8..23ace4a 100644 --- a/src/HITDevKit/HITDevKit/HITPeriodicPlugin.m +++ b/src/HITDevKit/HITDevKit/HITPeriodicPlugin.m @@ -19,7 +19,11 @@ - (instancetype)initWithSettings:(NSDictionary *)settings { self = [super initWithSettings:settings]; if (self) { - _repeat = [settings objectForKey:kHITPeriodicPluginRepeatKey]; + if ([settings.allKeys containsObject:kHITPeriodicPluginRepeatKey]) { + _repeat = [settings objectForKey:kHITPeriodicPluginRepeatKey]; + } else { + _repeat = @60; + } if ([_repeat intValue] > 0) { [self performSelector:@selector(setupCronJob) diff --git a/src/HITDevKit/HITDevKit/Info.plist b/src/HITDevKit/HITDevKit/Info.plist index 9549fb8..5103356 100644 --- a/src/HITDevKit/HITDevKit/Info.plist +++ b/src/HITDevKit/HITDevKit/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 270 + 288 NSHumanReadableCopyright Copyright © 2015 Yoann Gini (Open Source Project). All rights reserved. NSPrincipalClass diff --git a/src/Hello IT.xcodeproj/project.pbxproj b/src/Hello IT.xcodeproj/project.pbxproj index ec74e15..68e4319 100644 --- a/src/Hello IT.xcodeproj/project.pbxproj +++ b/src/Hello IT.xcodeproj/project.pbxproj @@ -43,6 +43,7 @@ F8340B9D1C96CF9000C820D7 /* statusbar-warning@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F8340B891C96CF9000C820D7 /* statusbar-warning@2x.png */; }; F8340B9E1C96CF9000C820D7 /* statusbar.png in Resources */ = {isa = PBXBuildFile; fileRef = F8340B8A1C96CF9000C820D7 /* statusbar.png */; }; F8340B9F1C96CF9000C820D7 /* statusbar@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F8340B8B1C96CF9000C820D7 /* statusbar@2x.png */; }; + F84238FF20C8748200FB5410 /* CachetHQComponent.hitp in Copy Default Plugins */ = {isa = PBXBuildFile; fileRef = F8D61B8A20C8731A00DE2453 /* CachetHQComponent.hitp */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; F89B593B1DA7DC350028D75F /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = F89B593A1DA7DC350028D75F /* Reachability.m */; }; /* End PBXBuildFile section */ @@ -131,6 +132,13 @@ remoteGlobalIDString = F83294A51F773076009DA574; remoteInfo = ADPass; }; + F842390120C8748800FB5410 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = F8B6573920C727D7009F31B6; + remoteInfo = CachetHQComponent; + }; F86CCC0A1F790D250043CF55 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = F83294AE1F773076009DA574 /* ADPass.xcodeproj */; @@ -138,6 +146,13 @@ remoteGlobalIDString = F83294A41F773076009DA574; remoteInfo = ADPass; }; + F8D61B8920C8731A00DE2453 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F8B6573A20C727D7009F31B6; + remoteInfo = CachetHQComponent; + }; F8F4E5761F1A73CC004E8789 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E1B2C8ED1B59351B005A9936 /* HITDevKit.xcodeproj */; @@ -210,6 +225,7 @@ dstPath = ""; dstSubfolderSpec = 13; files = ( + F84238FF20C8748200FB5410 /* CachetHQComponent.hitp in Copy Default Plugins */, F83294DD1F7736B5009DA574 /* ADPass.hitp in Copy Default Plugins */, E14B67DA1B59110D00941A27 /* ScriptedItem.hitp in Copy Default Plugins */, E14B67BB1B57888700941A27 /* OpenApplication.hitp in Copy Default Plugins */, @@ -282,6 +298,7 @@ F89B59391DA7DC350028D75F /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = ""; }; F89B593A1DA7DC350028D75F /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = ""; }; F8B315891FA6BB1400839784 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/MainMenu.strings; sourceTree = ""; }; + F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CachetHQ.xcodeproj; path = CachetHQ/CachetHQ.xcodeproj; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -329,6 +346,7 @@ E17743301B51E6E600A5B406 /* Plugins */ = { isa = PBXGroup; children = ( + F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */, F83294AE1F773076009DA574 /* ADPass.xcodeproj */, E17743591B51EA8500A5B406 /* OpenResource.xcodeproj */, E17743751B51F19B00A5B406 /* Separator.xcodeproj */, @@ -489,6 +507,14 @@ name = statusbar; sourceTree = ""; }; + F8D61B8620C8731A00DE2453 /* Products */ = { + isa = PBXGroup; + children = ( + F8D61B8A20C8731A00DE2453 /* CachetHQComponent.hitp */, + ); + name = Products; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -507,6 +533,7 @@ ); dependencies = ( F8F4E5771F1A73CC004E8789 /* PBXTargetDependency */, + F842390220C8748800FB5410 /* PBXTargetDependency */, F86CCC0B1F790D250043CF55 /* PBXTargetDependency */, F8F4E5791F1A73CC004E8789 /* PBXTargetDependency */, F8F4E57B1F1A73CC004E8789 /* PBXTargetDependency */, @@ -546,7 +573,7 @@ E1D067F21B51D08E00567172 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; TargetAttributes = { E1D067F91B51D08E00567172 = { @@ -576,6 +603,10 @@ ProductGroup = F83294AF1F773076009DA574 /* Products */; ProjectRef = F83294AE1F773076009DA574 /* ADPass.xcodeproj */; }, + { + ProductGroup = F8D61B8620C8731A00DE2453 /* Products */; + ProjectRef = F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */; + }, { ProductGroup = E1B2C8EE1B59351B005A9936 /* Products */; ProjectRef = E1B2C8ED1B59351B005A9936 /* HITDevKit.xcodeproj */; @@ -699,6 +730,13 @@ remoteRef = F83294B21F773078009DA574 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + F8D61B8A20C8731A00DE2453 /* CachetHQComponent.hitp */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = CachetHQComponent.hitp; + remoteRef = F8D61B8920C8731A00DE2453 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -785,6 +823,11 @@ target = E1D067F91B51D08E00567172 /* Hello IT */; targetProxy = E1D0680E1B51D08F00567172 /* PBXContainerItemProxy */; }; + F842390220C8748800FB5410 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CachetHQComponent; + targetProxy = F842390120C8748800FB5410 /* PBXContainerItemProxy */; + }; F86CCC0B1F790D250043CF55 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = ADPass; @@ -863,12 +906,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -916,12 +961,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/src/Hello IT.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/src/Hello IT.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/src/Hello IT.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/src/Hello IT/Info.plist b/src/Hello IT/Info.plist index 96be8c9..5c54748 100644 --- a/src/Hello IT/Info.plist +++ b/src/Hello IT/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.4.0 + 1.4.1 CFBundleSignature ???? CFBundleVersion - 270 + 288 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/src/Plugins/ADPass/ADPass.xcodeproj/project.pbxproj b/src/Plugins/ADPass/ADPass.xcodeproj/project.pbxproj index 188aa35..1da8e37 100644 --- a/src/Plugins/ADPass/ADPass.xcodeproj/project.pbxproj +++ b/src/Plugins/ADPass/ADPass.xcodeproj/project.pbxproj @@ -100,7 +100,7 @@ F832949D1F773076009DA574 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini"; TargetAttributes = { F83294A41F773076009DA574 = { @@ -178,6 +178,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -185,6 +186,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -233,6 +235,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -240,6 +243,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/src/Plugins/ADPass/ADPass/HITPADPass.m b/src/Plugins/ADPass/ADPass/HITPADPass.m index 23a2a43..f64b540 100644 --- a/src/Plugins/ADPass/ADPass/HITPADPass.m +++ b/src/Plugins/ADPass/ADPass/HITPADPass.m @@ -15,6 +15,7 @@ #define kHITPADPassLastNotifKey @"public.ad.pass.lastNotification" #define kHITPADPassWillExpireFormat @"willExpireFormat" +#define kHITPADPassNeverExpireInfo @"neverExpireInfo" #define kHITPADPassTooltip @"tooltip" #define kHITPADPassOfflineTooltip @"offlineTooltip" @@ -34,6 +35,7 @@ @interface HITPADPass () @property NSString *localeTablePath; @property NSString *willExpireFormat; +@property NSString *neverExpireInfo; @property NSString *tooltip; @property NSString *offlineTooltip; @@ -55,17 +57,19 @@ - (instancetype)initWithSettings:(NSDictionary*)settings if (self) { [NSUserNotificationCenter defaultUserNotificationCenter].delegate = self; - _alertXDaysBefore = [[settings objectForKey:kHITPADPassAlertXDaysBefore] integerValue]; - - if (_alertXDaysBefore == 0) { + if ([settings.allKeys containsObject:kHITPADPassAlertXDaysBefore]) { + _alertXDaysBefore = [[settings objectForKey:kHITPADPassAlertXDaysBefore] integerValue]; + } else { _alertXDaysBefore = 15; } NSString *defaultWillExpireFormat = @"🔐 📆 %ld"; + NSString *defaultNeverExpireInfo = @"🔐 ∞"; NSString *defaultTooltip = @"Delay before your password expire, change it before!"; NSString *defaultOfflineTooltip = @"Your IT infrastructure isn't available. Current info is based on the last recorded value."; _willExpireFormat = [settings objectForKey:kHITPADPassWillExpireFormat]; + _neverExpireInfo = [settings objectForKey:kHITPADPassNeverExpireInfo]; _tooltip = [settings objectForKey:kHITPADPassTooltip]; _offlineTooltip = [settings objectForKey:kHITPADPassOfflineTooltip]; @@ -73,6 +77,10 @@ - (instancetype)initWithSettings:(NSDictionary*)settings _willExpireFormat = [[NSBundle bundleForClass:[self class]] localizedStringForKey:kHITPADPassWillExpireFormat value:defaultWillExpireFormat table:nil]; } + if ([_neverExpireInfo length] == 0) { + _neverExpireInfo = [[NSBundle bundleForClass:[self class]] localizedStringForKey:kHITPADPassNeverExpireInfo value:defaultNeverExpireInfo table:nil]; + } + if ([_tooltip length] == 0) { _tooltip = [[NSBundle bundleForClass:[self class]] localizedStringForKey:kHITPADPassTooltip value:defaultTooltip table:nil]; } @@ -138,7 +146,12 @@ - (void)periodicAction:(NSTimer *)timer { - (void)updateTitle { NSDateComponents *components = [[NSCalendar currentCalendar] components:NSCalendarUnitDay fromDate:[NSDate date] toDate:self.passwordExpiryDate options:0]; long daysBeforeExpiry = (long)[components day]; - self.menuItem.title = [NSString stringWithFormat:self.willExpireFormat, daysBeforeExpiry]; + + if (daysBeforeExpiry == 10522613) { + self.menuItem.title = self.neverExpireInfo; + } else { + self.menuItem.title = [NSString stringWithFormat:self.willExpireFormat, daysBeforeExpiry]; + } if (self.lastADRequestSucceded) { self.menuItem.target = self; diff --git a/src/Plugins/ADPass/ADPass/en.lproj/Localizable.strings b/src/Plugins/ADPass/ADPass/en.lproj/Localizable.strings index 283c987..0c07a15 100644 --- a/src/Plugins/ADPass/ADPass/en.lproj/Localizable.strings +++ b/src/Plugins/ADPass/ADPass/en.lproj/Localizable.strings @@ -11,6 +11,7 @@ // To show `Your password will expire in 42d` use format `Your password will expire in %ldd` "willExpireFormat" = "Password expire in %ldd"; +"neverExpireInfo" = "Your password does not expire"; "tooltip" = "Delay before your password expire, change it before!"; "disabledTooltip" = "Your IT infrastructure isn't available. Current info is based on the last recorded value and you can't change your password."; diff --git a/src/Plugins/ADPass/ADPass/fr.lproj/Localizable.strings b/src/Plugins/ADPass/ADPass/fr.lproj/Localizable.strings index dc0847e..3b7e238 100644 --- a/src/Plugins/ADPass/ADPass/fr.lproj/Localizable.strings +++ b/src/Plugins/ADPass/ADPass/fr.lproj/Localizable.strings @@ -11,6 +11,7 @@ // To show `Your password will expire in 42d` use format `Your password will expire in %ldd` "willExpireFormat" = "Votre mot de passe expire dans %ldj"; +"neverExpireInfo" = "Votre mot de passe n'expire jamais"; "tooltip" = "Nombre de jours avant que votre mot de passe ne change, pensez à le changer avant !"; "disabledTooltip" = "Votre système d'information est injoignable. L'information actuelle est basée sur la dernière valeur enregistrée et vous ne pouvez pas changer votre mot de passe."; diff --git a/src/Plugins/CachetHQ/CachetHQ.xcodeproj/project.pbxproj b/src/Plugins/CachetHQ/CachetHQ.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c04e747 --- /dev/null +++ b/src/Plugins/CachetHQ/CachetHQ.xcodeproj/project.pbxproj @@ -0,0 +1,408 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + F811AD372149A0B700BD15AD /* CachetHQIncidents.m in Sources */ = {isa = PBXBuildFile; fileRef = F811AD362149A0B700BD15AD /* CachetHQIncidents.m */; }; + F811AD382149A18600BD15AD /* HITDevKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8B6574B20C7284D009F31B6 /* HITDevKit.framework */; }; + F8B6574C20C7284D009F31B6 /* HITDevKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8B6574B20C7284D009F31B6 /* HITDevKit.framework */; }; + F8B6574F20C7288C009F31B6 /* CachetHQComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = F8B6574E20C7288C009F31B6 /* CachetHQComponent.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + F811AD2F2149A07E00BD15AD /* CachetHQIncidents.hitp */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CachetHQIncidents.hitp; sourceTree = BUILT_PRODUCTS_DIR; }; + F811AD312149A07E00BD15AD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F811AD352149A0B700BD15AD /* CachetHQIncidents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CachetHQIncidents.h; sourceTree = ""; }; + F811AD362149A0B700BD15AD /* CachetHQIncidents.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CachetHQIncidents.m; sourceTree = ""; }; + F8B6573A20C727D7009F31B6 /* CachetHQComponent.hitp */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CachetHQComponent.hitp; sourceTree = BUILT_PRODUCTS_DIR; }; + F8B6573D20C727D7009F31B6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F8B6574B20C7284D009F31B6 /* HITDevKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = HITDevKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F8B6574D20C7288C009F31B6 /* CachetHQComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CachetHQComponent.h; sourceTree = ""; }; + F8B6574E20C7288C009F31B6 /* CachetHQComponent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CachetHQComponent.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + F811AD2C2149A07E00BD15AD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F811AD382149A18600BD15AD /* HITDevKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F8B6573720C727D7009F31B6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F8B6574C20C7284D009F31B6 /* HITDevKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + F811AD302149A07E00BD15AD /* CachetHQIncidents */ = { + isa = PBXGroup; + children = ( + F811AD312149A07E00BD15AD /* Info.plist */, + F811AD352149A0B700BD15AD /* CachetHQIncidents.h */, + F811AD362149A0B700BD15AD /* CachetHQIncidents.m */, + ); + path = CachetHQIncidents; + sourceTree = ""; + }; + F8B6573120C727D7009F31B6 = { + isa = PBXGroup; + children = ( + F8B6573C20C727D7009F31B6 /* CachetHQComponent */, + F811AD302149A07E00BD15AD /* CachetHQIncidents */, + F8B6573B20C727D7009F31B6 /* Products */, + F8B6574A20C7284D009F31B6 /* Frameworks */, + ); + sourceTree = ""; + }; + F8B6573B20C727D7009F31B6 /* Products */ = { + isa = PBXGroup; + children = ( + F8B6573A20C727D7009F31B6 /* CachetHQComponent.hitp */, + F811AD2F2149A07E00BD15AD /* CachetHQIncidents.hitp */, + ); + name = Products; + sourceTree = ""; + }; + F8B6573C20C727D7009F31B6 /* CachetHQComponent */ = { + isa = PBXGroup; + children = ( + F8B6573D20C727D7009F31B6 /* Info.plist */, + F8B6574D20C7288C009F31B6 /* CachetHQComponent.h */, + F8B6574E20C7288C009F31B6 /* CachetHQComponent.m */, + ); + path = CachetHQComponent; + sourceTree = ""; + }; + F8B6574A20C7284D009F31B6 /* Frameworks */ = { + isa = PBXGroup; + children = ( + F8B6574B20C7284D009F31B6 /* HITDevKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + F811AD2E2149A07E00BD15AD /* CachetHQIncidents */ = { + isa = PBXNativeTarget; + buildConfigurationList = F811AD342149A07E00BD15AD /* Build configuration list for PBXNativeTarget "CachetHQIncidents" */; + buildPhases = ( + F811AD2B2149A07E00BD15AD /* Sources */, + F811AD2C2149A07E00BD15AD /* Frameworks */, + F811AD2D2149A07E00BD15AD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CachetHQIncidents; + productName = CachetHQIncidents; + productReference = F811AD2F2149A07E00BD15AD /* CachetHQIncidents.hitp */; + productType = "com.apple.product-type.bundle"; + }; + F8B6573920C727D7009F31B6 /* CachetHQComponent */ = { + isa = PBXNativeTarget; + buildConfigurationList = F8B6574020C727D7009F31B6 /* Build configuration list for PBXNativeTarget "CachetHQComponent" */; + buildPhases = ( + F8B6573620C727D7009F31B6 /* Sources */, + F8B6573720C727D7009F31B6 /* Frameworks */, + F8B6573820C727D7009F31B6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CachetHQComponent; + productName = CachetHQ; + productReference = F8B6573A20C727D7009F31B6 /* CachetHQComponent.hitp */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + F8B6573220C727D7009F31B6 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0940; + ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; + TargetAttributes = { + F811AD2E2149A07E00BD15AD = { + CreatedOnToolsVersion = 9.4.1; + }; + F8B6573920C727D7009F31B6 = { + CreatedOnToolsVersion = 9.4; + }; + }; + }; + buildConfigurationList = F8B6573520C727D7009F31B6 /* Build configuration list for PBXProject "CachetHQ" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = F8B6573120C727D7009F31B6; + productRefGroup = F8B6573B20C727D7009F31B6 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + F8B6573920C727D7009F31B6 /* CachetHQComponent */, + F811AD2E2149A07E00BD15AD /* CachetHQIncidents */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + F811AD2D2149A07E00BD15AD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F8B6573820C727D7009F31B6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + F811AD2B2149A07E00BD15AD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F811AD372149A0B700BD15AD /* CachetHQIncidents.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F8B6573620C727D7009F31B6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F8B6574F20C7288C009F31B6 /* CachetHQComponent.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + F811AD322149A07E00BD15AD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = CRXPBZF3N4; + INFOPLIST_FILE = CachetHQIncidents/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + PRODUCT_BUNDLE_IDENTIFIER = com.github.ygini.CachetHQIncidents; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = hitp; + }; + name = Debug; + }; + F811AD332149A07E00BD15AD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = CRXPBZF3N4; + INFOPLIST_FILE = CachetHQIncidents/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + PRODUCT_BUNDLE_IDENTIFIER = com.github.ygini.CachetHQIncidents; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = hitp; + }; + name = Release; + }; + F8B6573E20C727D7009F31B6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + F8B6573F20C727D7009F31B6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + F8B6574120C727D7009F31B6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = CRXPBZF3N4; + INFOPLIST_FILE = CachetHQComponent/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + PRODUCT_BUNDLE_IDENTIFIER = com.github.ygini.hitp.CachetHQ; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = hitp; + }; + name = Debug; + }; + F8B6574220C727D7009F31B6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = CRXPBZF3N4; + INFOPLIST_FILE = CachetHQComponent/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + PRODUCT_BUNDLE_IDENTIFIER = com.github.ygini.hitp.CachetHQ; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = hitp; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + F811AD342149A07E00BD15AD /* Build configuration list for PBXNativeTarget "CachetHQIncidents" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F811AD322149A07E00BD15AD /* Debug */, + F811AD332149A07E00BD15AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F8B6573520C727D7009F31B6 /* Build configuration list for PBXProject "CachetHQ" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F8B6573E20C727D7009F31B6 /* Debug */, + F8B6573F20C727D7009F31B6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F8B6574020C727D7009F31B6 /* Build configuration list for PBXNativeTarget "CachetHQComponent" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F8B6574120C727D7009F31B6 /* Debug */, + F8B6574220C727D7009F31B6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = F8B6573220C727D7009F31B6 /* Project object */; +} diff --git a/src/Plugins/CachetHQ/CachetHQ.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/src/Plugins/CachetHQ/CachetHQ.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..5bd713d --- /dev/null +++ b/src/Plugins/CachetHQ/CachetHQ.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/src/Plugins/CachetHQ/CachetHQ.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/src/Plugins/CachetHQ/CachetHQ.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/src/Plugins/CachetHQ/CachetHQ.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/src/Plugins/CachetHQ/CachetHQComponent/CachetHQComponent.h b/src/Plugins/CachetHQ/CachetHQComponent/CachetHQComponent.h new file mode 100644 index 0000000..841bb79 --- /dev/null +++ b/src/Plugins/CachetHQ/CachetHQComponent/CachetHQComponent.h @@ -0,0 +1,15 @@ +// +// CachetHQComponent.h +// CachetHQ +// +// Created by Yoann Gini on 05/06/2018. +// Copyright © 2018 Yoann Gini (Open Source Project). All rights reserved. +// + +#import + +#import + +@interface CachetHQComponent : HITPeriodicPlugin + +@end diff --git a/src/Plugins/CachetHQ/CachetHQComponent/CachetHQComponent.m b/src/Plugins/CachetHQ/CachetHQComponent/CachetHQComponent.m new file mode 100644 index 0000000..760da4d --- /dev/null +++ b/src/Plugins/CachetHQ/CachetHQComponent/CachetHQComponent.m @@ -0,0 +1,287 @@ +// +// CachetHQComponent.m +// CachetHQ +// +// Created by Yoann Gini on 05/06/2018. +// Copyright © 2018 Yoann Gini (Open Source Project). All rights reserved. +// + +#import "CachetHQComponent.h" + +#define kCachetHQBaseURL @"baseURL" +#define kCachetHQSortScenario @"stateSortScenario" + +#import + +typedef NS_ENUM(NSInteger, HITPSubMenuSortScenario) { + HITPSubMenuSortScenarioUnavailableWin = 0, + HITPSubMenuSortScenarioOKWin +}; + +@interface CachetHQComponent () +@property id pluginsManager; +@property HITPSubMenuSortScenario stateSortScenario; +@property NSURL *componentsAPI; +@property NSMutableDictionary *menuItemPerServiceKey; +@property NSMutableDictionary *menuItemPerServiceGroupKey; +@property NSMutableDictionary *submenuPerServiceGroupKey; +@property NSMenu *cachetHQMenu; +@end + + +@implementation CachetHQComponent + ++ (id)newPlugInInstanceWithSettings:(NSDictionary*)settings { + id instance = [[self alloc] initWithSettings:settings]; + return instance; +} + +- (instancetype)initWithSettings:(NSDictionary*)settings +{ + self = [super initWithSettings:settings]; + if (self) { + _menuItemPerServiceKey = [NSMutableDictionary new]; + _menuItemPerServiceGroupKey = [NSMutableDictionary new]; + _submenuPerServiceGroupKey = [NSMutableDictionary new]; + _componentsAPI = [[NSURL URLWithString:[settings objectForKey:kCachetHQBaseURL]] URLByAppendingPathComponent:@"/api/v1/components/groups"]; + + NSNumber *selectedScenario = [settings objectForKey:kCachetHQSortScenario]; + if (selectedScenario) { + _stateSortScenario = [selectedScenario integerValue]; + } else { + _stateSortScenario = HITPSubMenuSortScenarioUnavailableWin; + } + } + return self; +} + +-(NSMenuItem *)prepareNewMenuItem { + NSMenuItem *menuItem = [super prepareNewMenuItem]; + menuItem.action = NULL; + menuItem.target = nil; + + _cachetHQMenu = [[NSMenu alloc] init]; + _cachetHQMenu.delegate = self; + + menuItem.submenu = _cachetHQMenu; + return menuItem; +} + +- (void)periodicAction:(NSTimer *)timer { + [self reloadStateAtPage:1]; +} + +- (void)reloadStateAtPage:(NSInteger)requestedPage { + NSURLComponents *urlComponents = [NSURLComponents componentsWithURL:self.componentsAPI resolvingAgainstBaseURL:YES]; + + urlComponents.queryItems = @[ + [NSURLQueryItem queryItemWithName:@"sort" value:@"id"], + [NSURLQueryItem queryItemWithName:@"order" value:@"desc"], +#ifdef DEBUG + // Here to ensure during debug that pagination is working well. + [NSURLQueryItem queryItemWithName:@"per_page" value:@"3"], +#endif + + [NSURLQueryItem queryItemWithName:@"page" value:[NSString stringWithFormat:@"%ld", (long)requestedPage]] + ]; + + [[[NSURLSession sharedSession] dataTaskWithURL:[urlComponents URL] + completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable connectionError) { + if (connectionError) { + self.testState = HITPluginTestStateNone; + asl_log(NULL, NULL, ASL_LEVEL_INFO, "Connection error during test."); + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "%s", [[connectionError description] cStringUsingEncoding:NSUTF8StringEncoding]); + + } else { + NSError *jsonError = nil; + NSDictionary * cachetInfos = [NSJSONSerialization JSONObjectWithData:data + options:0 + error:&jsonError]; + + if (jsonError) { + self.testState = HITPluginTestStateNone; + asl_log(NULL, NULL, ASL_LEVEL_INFO, "JSON decoding error."); + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "%s", [[jsonError description] cStringUsingEncoding:NSUTF8StringEncoding]); + } else { + + NSInteger totalPages = [[cachetInfos valueForKeyPath:@"meta.pagination.total_pages"] integerValue]; + + + for (NSDictionary *serviceGroup in [cachetInfos objectForKey:@"data"]) { + NSNumber *serviceGroupID = [serviceGroup objectForKey:@"id"]; + [self updateServiceGroup:[serviceGroupID stringValue] withInfos:serviceGroup]; + } + + [self updateSumarizedServicesState]; + + if (requestedPage < totalPages) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self reloadStateAtPage:requestedPage+1]; + }); + } + } + } + }] resume]; +} + +- (void)updateServiceGroup:(NSString*)serviceGroupKey withInfos:(NSDictionary*)infos { + NSString *serviceGroupName = [infos objectForKey:@"name"]; + + NSMenu *groupSubmenu = nil; + @synchronized(_submenuPerServiceGroupKey) { + groupSubmenu = [self.submenuPerServiceGroupKey objectForKey:serviceGroupKey]; + if (!groupSubmenu) { + groupSubmenu = [NSMenu new]; + + [self.submenuPerServiceGroupKey setObject:groupSubmenu forKey:serviceGroupKey]; + + NSMenuItem * menuItem = nil; + @synchronized(_menuItemPerServiceGroupKey) { + menuItem = [self.menuItemPerServiceGroupKey objectForKey:serviceGroupKey]; + if (!menuItem) { + menuItem = [[NSMenuItem alloc] initWithTitle:serviceGroupName + action:NULL + keyEquivalent:@""]; + + [self.menuItemPerServiceKey setObject:menuItem forKey:serviceGroupKey]; + [self.cachetHQMenu addItem:menuItem]; + } + } + + menuItem.submenu = groupSubmenu; + } + } + + for (NSDictionary *serviceState in [infos objectForKey:@"enabled_components"]) { + NSNumber *serviceID = [serviceState objectForKey:@"id"]; + [self updateService:[NSString stringWithFormat:@"%@-%@", serviceGroupKey, serviceID] withInfos:serviceState]; + } + + +} + +- (void)updateService:(NSString*)serviceKey withInfos:(NSDictionary*)infos { + NSString *serviceName = [infos objectForKey:@"name"]; + NSString *serviceDescription = [infos objectForKey:@"description"]; + NSNumber *serviceStatus = [infos objectForKey:@"status"]; + NSString *serviceGroupKey = [[infos objectForKey:@"group_id"] stringValue]; + + NSMenu *groupSubmenu = nil; + @synchronized(_submenuPerServiceGroupKey) { + groupSubmenu = [self.submenuPerServiceGroupKey objectForKey:serviceGroupKey]; + } + + if (!groupSubmenu) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "Impossible scenario, all groups' menu should have been created now!"); + } else { + NSMenuItem *menuItem = nil; + @synchronized(_menuItemPerServiceKey) { + menuItem = [self.menuItemPerServiceKey objectForKey:serviceKey]; + if (!menuItem) { + menuItem = [[NSMenuItem alloc] initWithTitle:serviceName + action:@selector(userActionOnServiceItem:) + keyEquivalent:@""]; + menuItem.target = self; + + [self.menuItemPerServiceKey setObject:menuItem forKey:serviceKey]; + [groupSubmenu addItem:menuItem]; + } + } + + menuItem.title = serviceName; + menuItem.toolTip = serviceDescription; + menuItem.representedObject = infos; + + [self updateMenuItem:menuItem withCachetState:[serviceStatus integerValue]]; + } +} + +- (void)updateSumarizedServicesState { + asl_log(NULL, NULL, ASL_LEVEL_INFO, "Sumerizing CachetHQ states"); + + NSInteger worstState = 1; + for (NSMenuItem *groupMenuItem in self.cachetHQMenu.itemArray) { + NSInteger submenuWorstState = 1; + + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Working on group menu %s", [groupMenuItem.title cStringUsingEncoding:NSUTF8StringEncoding]); + + for (NSMenuItem *serviceMenuItem in groupMenuItem.submenu.itemArray) { + NSDictionary *serviceInfo = serviceMenuItem.representedObject; + NSNumber *serviceStatus = [serviceInfo objectForKey:@"status"]; + + NSInteger state = [serviceStatus integerValue]; + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Working on group item %s with current state %ld", [serviceMenuItem.title cStringUsingEncoding:NSUTF8StringEncoding], state); + + + if (state > submenuWorstState) { + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Evaluated item state is worst than previous one for this group"); + submenuWorstState = state; + } + } + + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Updating group menu %s with state %ld", [groupMenuItem.title cStringUsingEncoding:NSUTF8StringEncoding], submenuWorstState); + [self updateMenuItem:groupMenuItem withCachetState:submenuWorstState]; + + if (submenuWorstState > worstState) { + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Evaluated group state is worst than previous one for the global state"); + worstState = submenuWorstState; + } + } + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Updating global menu %s with state %ld", [self.menuItem.title cStringUsingEncoding:NSUTF8StringEncoding], worstState); + switch (worstState) { + case 4: + self.testState = HITPluginTestStateError; + break; + case 3: + case 2: + self.testState = HITPluginTestStateWarning; + break; + case 1: + self.testState = HITPluginTestStateOK; + break; + default: + self.testState = HITPluginTestStateNone; + break; + } +} + +- (void)updateMenuItem:(NSMenuItem*)menuItem withCachetState:(NSInteger)state { + switch (state) { + case 4: + menuItem.image = [[NSImage alloc] initWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.github.ygini.HITDevKit"] pathForResource:@"Error" + ofType:@"tiff"]]; + break; + case 3: + case 2: + menuItem.image = [[NSImage alloc] initWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.github.ygini.HITDevKit"] pathForResource:@"Warning" + ofType:@"tiff"]]; + break; + case 1: + menuItem.image = [[NSImage alloc] initWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.github.ygini.HITDevKit"] pathForResource:@"OK" + ofType:@"tiff"]]; + break; + default: + menuItem.image = nil; + break; + } +} + +- (void)userActionOnServiceItem:(NSMenuItem*)menuItem { + NSDictionary *infos = menuItem.representedObject; + NSURL *serviceLink = [NSURL URLWithString:[infos objectForKey:@"link"]]; + + if (serviceLink) { + [[NSWorkspace sharedWorkspace] openURL:serviceLink]; + } +} + +#pragma mark - NSMenuDelegate + +- (void)menuWillOpen:(NSMenu *)menu { +} + +- (void)menuDidClose:(NSMenu *)menu { +} + + +@end diff --git a/src/Plugins/CachetHQ/CachetHQComponent/Info.plist b/src/Plugins/CachetHQ/CachetHQComponent/Info.plist new file mode 100644 index 0000000..d466d03 --- /dev/null +++ b/src/Plugins/CachetHQ/CachetHQComponent/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + HITPFunctionIdentifier + public.cachethq.component + NSHumanReadableCopyright + Copyright © 2018 Yoann Gini (Open Source Project). All rights reserved. + NSPrincipalClass + CachetHQComponent + + diff --git a/src/Plugins/CachetHQ/CachetHQIncidents/CachetHQIncidents.h b/src/Plugins/CachetHQ/CachetHQIncidents/CachetHQIncidents.h new file mode 100644 index 0000000..690fef3 --- /dev/null +++ b/src/Plugins/CachetHQ/CachetHQIncidents/CachetHQIncidents.h @@ -0,0 +1,13 @@ +// +// CachetHQIncidents.h +// CachetHQIncidents +// +// Created by Yoann Gini on 12/09/2018. +// Copyright © 2018 Yoann Gini (Open Source Project). All rights reserved. +// + +#import + +@interface CachetHQIncidents : HITPeriodicPlugin + +@end diff --git a/src/Plugins/CachetHQ/CachetHQIncidents/CachetHQIncidents.m b/src/Plugins/CachetHQ/CachetHQIncidents/CachetHQIncidents.m new file mode 100644 index 0000000..1e28fc9 --- /dev/null +++ b/src/Plugins/CachetHQ/CachetHQIncidents/CachetHQIncidents.m @@ -0,0 +1,272 @@ +// +// CachetHQIncidents.m +// CachetHQIncidents +// +// Created by Yoann Gini on 12/09/2018. +// Copyright © 2018 Yoann Gini (Open Source Project). All rights reserved. +// + +#import "CachetHQIncidents.h" + +#define kCachetHQBaseURL @"baseURL" + +#import + +@interface CachetHQIncidents () +@property id pluginsManager; +@property NSURL *incidentsAPI; +@property NSMutableDictionary *menuItemPerServiceKey; +@property NSMutableDictionary *menuItemPerServiceGroupKey; +@property NSMutableDictionary *submenuPerServiceGroupKey; +@property NSMenu *cachetHQMenu; +@end + +@implementation CachetHQIncidents + ++ (id)newPlugInInstanceWithSettings:(NSDictionary*)settings { + id instance = [[self alloc] initWithSettings:settings]; + return instance; +} + +- (instancetype)initWithSettings:(NSDictionary*)settings +{ + self = [super initWithSettings:settings]; + if (self) { + _menuItemPerServiceKey = [NSMutableDictionary new]; + _menuItemPerServiceGroupKey = [NSMutableDictionary new]; + _submenuPerServiceGroupKey = [NSMutableDictionary new]; + _incidentsAPI = [[NSURL URLWithString:[settings objectForKey:kCachetHQBaseURL]] URLByAppendingPathComponent:@"/api/v1/incidents"]; + } + return self; +} + +-(NSMenuItem *)prepareNewMenuItem { + NSMenuItem *menuItem = [super prepareNewMenuItem]; + menuItem.action = NULL; + menuItem.target = nil; + + _cachetHQMenu = [[NSMenu alloc] init]; + _cachetHQMenu.delegate = self; + + menuItem.submenu = _cachetHQMenu; + return menuItem; +} + +- (void)periodicAction:(NSTimer *)timer { + [self reloadStateAtPage:1]; +} + +- (void)reloadStateAtPage:(NSInteger)requestedPage { + NSURLComponents *urlComponents = [NSURLComponents componentsWithURL:self.incidentsAPI resolvingAgainstBaseURL:YES]; + + urlComponents.queryItems = @[ + [NSURLQueryItem queryItemWithName:@"sort" value:@"id"], + [NSURLQueryItem queryItemWithName:@"order" value:@"desc"], +#ifdef DEBUG + // Here to ensure during debug that pagination is working well. + [NSURLQueryItem queryItemWithName:@"per_page" value:@"3"], +#endif + + [NSURLQueryItem queryItemWithName:@"page" value:[NSString stringWithFormat:@"%ld", (long)requestedPage]] + ]; + + [[[NSURLSession sharedSession] dataTaskWithURL:[urlComponents URL] + completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable connectionError) { + if (connectionError) { + self.testState = HITPluginTestStateNone; + asl_log(NULL, NULL, ASL_LEVEL_INFO, "Connection error during test."); + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "%s", [[connectionError description] cStringUsingEncoding:NSUTF8StringEncoding]); + + } else { + NSError *jsonError = nil; + NSDictionary * cachetInfos = [NSJSONSerialization JSONObjectWithData:data + options:0 + error:&jsonError]; + + if (jsonError) { + self.testState = HITPluginTestStateNone; + asl_log(NULL, NULL, ASL_LEVEL_INFO, "JSON decoding error."); + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "%s", [[jsonError description] cStringUsingEncoding:NSUTF8StringEncoding]); + } else { + + NSInteger totalPages = [[cachetInfos valueForKeyPath:@"meta.pagination.total_pages"] integerValue]; + +# warning Update to fit Incidents API + for (NSDictionary *serviceGroup in [cachetInfos objectForKey:@"data"]) { + NSNumber *serviceGroupID = [serviceGroup objectForKey:@"id"]; + [self updateServiceGroup:[serviceGroupID stringValue] withInfos:serviceGroup]; + } + + [self updateSumarizedServicesState]; + + if (requestedPage < totalPages) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self reloadStateAtPage:requestedPage+1]; + }); + } + } + } + }] resume]; +} + +- (void)updateServiceGroup:(NSString*)serviceGroupKey withInfos:(NSDictionary*)infos { + NSString *serviceGroupName = [infos objectForKey:@"name"]; + + NSMenu *groupSubmenu = nil; + @synchronized(_submenuPerServiceGroupKey) { + groupSubmenu = [self.submenuPerServiceGroupKey objectForKey:serviceGroupKey]; + if (!groupSubmenu) { + groupSubmenu = [NSMenu new]; + + [self.submenuPerServiceGroupKey setObject:groupSubmenu forKey:serviceGroupKey]; + + NSMenuItem * menuItem = nil; + @synchronized(_menuItemPerServiceGroupKey) { + menuItem = [self.menuItemPerServiceGroupKey objectForKey:serviceGroupKey]; + if (!menuItem) { + menuItem = [[NSMenuItem alloc] initWithTitle:serviceGroupName + action:NULL + keyEquivalent:@""]; + + [self.menuItemPerServiceKey setObject:menuItem forKey:serviceGroupKey]; + [self.cachetHQMenu addItem:menuItem]; + } + } + + menuItem.submenu = groupSubmenu; + } + } + + for (NSDictionary *serviceState in [infos objectForKey:@"enabled_incidents"]) { + NSNumber *serviceID = [serviceState objectForKey:@"id"]; + [self updateService:[NSString stringWithFormat:@"%@-%@", serviceGroupKey, serviceID] withInfos:serviceState]; + } + + +} + +- (void)updateService:(NSString*)serviceKey withInfos:(NSDictionary*)infos { + NSString *serviceName = [infos objectForKey:@"name"]; + NSString *serviceDescription = [infos objectForKey:@"description"]; + NSNumber *serviceStatus = [infos objectForKey:@"status"]; + NSString *serviceGroupKey = [[infos objectForKey:@"group_id"] stringValue]; + + NSMenu *groupSubmenu = nil; + @synchronized(_submenuPerServiceGroupKey) { + groupSubmenu = [self.submenuPerServiceGroupKey objectForKey:serviceGroupKey]; + } + + if (!groupSubmenu) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "Impossible scenario, all groups' menu should have been created now!"); + } else { + NSMenuItem *menuItem = nil; + @synchronized(_menuItemPerServiceKey) { + menuItem = [self.menuItemPerServiceKey objectForKey:serviceKey]; + if (!menuItem) { + menuItem = [[NSMenuItem alloc] initWithTitle:serviceName + action:@selector(userActionOnServiceItem:) + keyEquivalent:@""]; + menuItem.target = self; + + [self.menuItemPerServiceKey setObject:menuItem forKey:serviceKey]; + [groupSubmenu addItem:menuItem]; + } + } + + menuItem.title = serviceName; + menuItem.toolTip = serviceDescription; + menuItem.representedObject = infos; + + [self updateMenuItem:menuItem withCachetState:[serviceStatus integerValue]]; + } +} + +- (void)updateSumarizedServicesState { + asl_log(NULL, NULL, ASL_LEVEL_INFO, "Sumerizing CachetHQ states"); + + NSInteger worstState = 1; + for (NSMenuItem *groupMenuItem in self.cachetHQMenu.itemArray) { + NSInteger submenuWorstState = 1; + + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Working on group menu %s", [groupMenuItem.title cStringUsingEncoding:NSUTF8StringEncoding]); + + for (NSMenuItem *serviceMenuItem in groupMenuItem.submenu.itemArray) { + NSDictionary *serviceInfo = serviceMenuItem.representedObject; + NSNumber *serviceStatus = [serviceInfo objectForKey:@"status"]; + + NSInteger state = [serviceStatus integerValue]; + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Working on group item %s with current state %ld", [serviceMenuItem.title cStringUsingEncoding:NSUTF8StringEncoding], state); + + + if (state > submenuWorstState) { + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Evaluated item state is worst than previous one for this group"); + submenuWorstState = state; + } + } + + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Updating group menu %s with state %ld", [groupMenuItem.title cStringUsingEncoding:NSUTF8StringEncoding], submenuWorstState); + [self updateMenuItem:groupMenuItem withCachetState:submenuWorstState]; + + if (submenuWorstState > worstState) { + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Evaluated group state is worst than previous one for the global state"); + worstState = submenuWorstState; + } + } + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Updating global menu %s with state %ld", [self.menuItem.title cStringUsingEncoding:NSUTF8StringEncoding], worstState); + switch (worstState) { + case 4: + self.testState = HITPluginTestStateError; + break; + case 3: + case 2: + self.testState = HITPluginTestStateWarning; + break; + case 1: + self.testState = HITPluginTestStateOK; + break; + default: + self.testState = HITPluginTestStateNone; + break; + } +} + +- (void)updateMenuItem:(NSMenuItem*)menuItem withCachetState:(NSInteger)state { + switch (state) { + case 4: + menuItem.image = [[NSImage alloc] initWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.github.ygini.HITDevKit"] pathForResource:@"Error" + ofType:@"tiff"]]; + break; + case 3: + case 2: + menuItem.image = [[NSImage alloc] initWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.github.ygini.HITDevKit"] pathForResource:@"Warning" + ofType:@"tiff"]]; + break; + case 1: + menuItem.image = [[NSImage alloc] initWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.github.ygini.HITDevKit"] pathForResource:@"OK" + ofType:@"tiff"]]; + break; + default: + menuItem.image = nil; + break; + } +} + +- (void)userActionOnServiceItem:(NSMenuItem*)menuItem { + NSDictionary *infos = menuItem.representedObject; + NSURL *serviceLink = [NSURL URLWithString:[infos objectForKey:@"link"]]; + + if (serviceLink) { + [[NSWorkspace sharedWorkspace] openURL:serviceLink]; + } +} + +#pragma mark - NSMenuDelegate + +- (void)menuWillOpen:(NSMenu *)menu { +} + +- (void)menuDidClose:(NSMenu *)menu { +} + + +@end diff --git a/src/Plugins/CachetHQ/CachetHQIncidents/Info.plist b/src/Plugins/CachetHQ/CachetHQIncidents/Info.plist new file mode 100644 index 0000000..ca71637 --- /dev/null +++ b/src/Plugins/CachetHQ/CachetHQIncidents/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + HITPFunctionIdentifier + public.cachethq.incidents + CFBundleVersion + 1 + NSHumanReadableCopyright + Copyright © 2018 Yoann Gini (Open Source Project). All rights reserved. + NSPrincipalClass + CachetHQIncidents + + diff --git a/src/Plugins/OpenApplication/OpenApplication.xcodeproj/project.pbxproj b/src/Plugins/OpenApplication/OpenApplication.xcodeproj/project.pbxproj index 24bb0af..77dfca4 100644 --- a/src/Plugins/OpenApplication/OpenApplication.xcodeproj/project.pbxproj +++ b/src/Plugins/OpenApplication/OpenApplication.xcodeproj/project.pbxproj @@ -93,7 +93,7 @@ E14B67951B57855F00941A27 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; TargetAttributes = { E14B679C1B57855F00941A27 = { @@ -171,12 +171,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -222,12 +224,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/src/Plugins/OpenApplication/OpenApplication/Info.plist b/src/Plugins/OpenApplication/OpenApplication/Info.plist index 98f773a..095bca3 100644 --- a/src/Plugins/OpenApplication/OpenApplication/Info.plist +++ b/src/Plugins/OpenApplication/OpenApplication/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 270 + 288 HITPFunctionIdentifier public.open.application NSHumanReadableCopyright diff --git a/src/Plugins/OpenResource/OpenResource.xcodeproj/project.pbxproj b/src/Plugins/OpenResource/OpenResource.xcodeproj/project.pbxproj index 2fdac01..2ae46f7 100644 --- a/src/Plugins/OpenResource/OpenResource.xcodeproj/project.pbxproj +++ b/src/Plugins/OpenResource/OpenResource.xcodeproj/project.pbxproj @@ -93,7 +93,7 @@ E1D068211B51E54E00567172 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; TargetAttributes = { E1D068281B51E54E00567172 = { @@ -171,12 +171,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -222,12 +224,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/src/Plugins/OpenResource/OpenResource/Info.plist b/src/Plugins/OpenResource/OpenResource/Info.plist index 0a41521..7bf0bc3 100644 --- a/src/Plugins/OpenResource/OpenResource/Info.plist +++ b/src/Plugins/OpenResource/OpenResource/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 270 + 288 HITPFunctionIdentifier public.open.resource NSHumanReadableCopyright diff --git a/src/Plugins/Quit/Quit.xcodeproj/project.pbxproj b/src/Plugins/Quit/Quit.xcodeproj/project.pbxproj index a5f4df5..74984dc 100644 --- a/src/Plugins/Quit/Quit.xcodeproj/project.pbxproj +++ b/src/Plugins/Quit/Quit.xcodeproj/project.pbxproj @@ -110,7 +110,7 @@ E1AF40391B529AA10017B4DD /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; TargetAttributes = { E1AF40401B529AA10017B4DD = { @@ -203,12 +203,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -255,12 +257,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/src/Plugins/Quit/Quit/Info.plist b/src/Plugins/Quit/Quit/Info.plist index 650e86a..be4e3cb 100644 --- a/src/Plugins/Quit/Quit/Info.plist +++ b/src/Plugins/Quit/Quit/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 270 + 288 HITPFunctionIdentifier public.quit NSHumanReadableCopyright diff --git a/src/Plugins/ScriptedItem/CustomScripts/com.github.ygini.hello-it.ip.sh b/src/Plugins/ScriptedItem/CustomScripts/com.github.ygini.hello-it.ip.sh index 97dcf3b..8af59b1 100755 --- a/src/Plugins/ScriptedItem/CustomScripts/com.github.ygini.hello-it.ip.sh +++ b/src/Plugins/ScriptedItem/CustomScripts/com.github.ygini.hello-it.ip.sh @@ -74,7 +74,7 @@ function updateTitleWithArgs { else updateTitle "Local IP: $ipAddress" handleStateUpdate $mode ${STATE[0]} - updateTooltip "Having an IP address doesn't mean you've Internet access" + updateTooltip "Having an IP address doesn't mean you've Internet access\nClick to copy your IP to the pasteboard" fi } diff --git a/src/Plugins/ScriptedItem/ScriptedItem.xcodeproj/project.pbxproj b/src/Plugins/ScriptedItem/ScriptedItem.xcodeproj/project.pbxproj index bb293ca..f3a0ef4 100644 --- a/src/Plugins/ScriptedItem/ScriptedItem.xcodeproj/project.pbxproj +++ b/src/Plugins/ScriptedItem/ScriptedItem.xcodeproj/project.pbxproj @@ -96,7 +96,7 @@ E14B67BD1B59059000941A27 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; TargetAttributes = { E14B67C41B59059000941A27 = { @@ -175,12 +175,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -226,12 +228,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/src/Plugins/ScriptedItem/ScriptedItem/HITPScriptedItem.m b/src/Plugins/ScriptedItem/ScriptedItem/HITPScriptedItem.m index aa4656c..57d7ff0 100644 --- a/src/Plugins/ScriptedItem/ScriptedItem/HITPScriptedItem.m +++ b/src/Plugins/ScriptedItem/ScriptedItem/HITPScriptedItem.m @@ -17,12 +17,12 @@ #define kHITSimplePluginTitleKey @"title" #define kHITPDenyUserWritableScript @"denyUserWritableScript" -#ifdef DEBUG -#warning This static path to the development custom scripts must be replaced by something smart -#define kHITPCustomScriptsPath @"/Users/ygi/Sources/Public/Hello-IT/src/Plugins/ScriptedItem/CustomScripts" -#else #define kHITPCustomScriptsPath @"/Library/Application Support/com.github.ygini.hello-it/CustomScripts" -#endif + +//#ifdef DEBUG +//#warning This static path to the development custom scripts must be replaced by something smart +//#define kHITPCustomScriptsPath @"/Users/ygi/Sources/Public/Hello-IT/src/Plugins/ScriptedItem/CustomScripts" +//#endif #import @@ -212,7 +212,8 @@ - (void)handleScriptRequest:(NSString*)request { NSRange limiterRange = [request rangeOfString:@":"]; NSString *key = [[[request substringToIndex:limiterRange.location] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] lowercaseString]; NSString *value = [[request substringFromIndex:limiterRange.location+1] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - + value = [value stringByReplacingOccurrencesOfString:@"\\n" withString:@"\n"]; + if ([key isEqualToString:@"hitp-title"]) { self.menuItem.title = value; diff --git a/src/Plugins/ScriptedItem/ScriptedItem/Info.plist b/src/Plugins/ScriptedItem/ScriptedItem/Info.plist index e89b248..21735ff 100644 --- a/src/Plugins/ScriptedItem/ScriptedItem/Info.plist +++ b/src/Plugins/ScriptedItem/ScriptedItem/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 270 + 288 HITPFunctionIdentifier public.script.item NSHumanReadableCopyright diff --git a/src/Plugins/Separator/Separator.xcodeproj/project.pbxproj b/src/Plugins/Separator/Separator.xcodeproj/project.pbxproj index 7254648..cd3ce7f 100644 --- a/src/Plugins/Separator/Separator.xcodeproj/project.pbxproj +++ b/src/Plugins/Separator/Separator.xcodeproj/project.pbxproj @@ -93,7 +93,7 @@ E17743631B51F19B00A5B406 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; TargetAttributes = { E177436A1B51F19B00A5B406 = { @@ -171,12 +171,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -222,12 +224,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/src/Plugins/Separator/Separator/Info.plist b/src/Plugins/Separator/Separator/Info.plist index a955abc..3c60227 100644 --- a/src/Plugins/Separator/Separator/Info.plist +++ b/src/Plugins/Separator/Separator/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 270 + 288 HITPFunctionIdentifier public.separator NSHumanReadableCopyright diff --git a/src/Plugins/SubMenu/SubMenu.xcodeproj/project.pbxproj b/src/Plugins/SubMenu/SubMenu.xcodeproj/project.pbxproj index 2dc218d..6f5bcaa 100644 --- a/src/Plugins/SubMenu/SubMenu.xcodeproj/project.pbxproj +++ b/src/Plugins/SubMenu/SubMenu.xcodeproj/project.pbxproj @@ -93,7 +93,7 @@ E1AF405E1B529F460017B4DD /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; TargetAttributes = { E1AF40651B529F460017B4DD = { @@ -171,12 +171,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -222,12 +224,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/src/Plugins/SubMenu/SubMenu/Info.plist b/src/Plugins/SubMenu/SubMenu/Info.plist index 61c56d8..6c69442 100644 --- a/src/Plugins/SubMenu/SubMenu/Info.plist +++ b/src/Plugins/SubMenu/SubMenu/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 270 + 288 HITPFunctionIdentifier public.submenu NSHumanReadableCopyright diff --git a/src/Plugins/TestHTTP/TestHTTP.xcodeproj/project.pbxproj b/src/Plugins/TestHTTP/TestHTTP.xcodeproj/project.pbxproj index ce2c486..b7f2728 100644 --- a/src/Plugins/TestHTTP/TestHTTP.xcodeproj/project.pbxproj +++ b/src/Plugins/TestHTTP/TestHTTP.xcodeproj/project.pbxproj @@ -93,7 +93,7 @@ E12F1E381B52355B005A4418 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; TargetAttributes = { E12F1E3F1B52355B005A4418 = { @@ -171,12 +171,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -222,12 +224,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/src/Plugins/TestHTTP/TestHTTP/Info.plist b/src/Plugins/TestHTTP/TestHTTP/Info.plist index 659112b..96a36ca 100644 --- a/src/Plugins/TestHTTP/TestHTTP/Info.plist +++ b/src/Plugins/TestHTTP/TestHTTP/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 270 + 288 HITPFunctionIdentifier public.test.http NSHumanReadableCopyright diff --git a/src/Plugins/Title/Title.xcodeproj/project.pbxproj b/src/Plugins/Title/Title.xcodeproj/project.pbxproj index 96bd874..a15d8af 100644 --- a/src/Plugins/Title/Title.xcodeproj/project.pbxproj +++ b/src/Plugins/Title/Title.xcodeproj/project.pbxproj @@ -93,7 +93,7 @@ E17743821B51F2C900A5B406 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Yoann Gini (Open Source Project)"; TargetAttributes = { E17743891B51F2C900A5B406 = { @@ -171,12 +171,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -222,12 +224,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/src/Plugins/Title/Title/Info.plist b/src/Plugins/Title/Title/Info.plist index 6a8ddbd..d33793d 100644 --- a/src/Plugins/Title/Title/Info.plist +++ b/src/Plugins/Title/Title/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 270 + 288 HITPFunctionIdentifier public.title NSHumanReadableCopyright