diff --git a/CHANGELOG.md b/CHANGELOG.md index eee8cb65..00a1e01d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Changelog ## +### v1.6.1 ### + +- added support for notifications, use `System Preferences` to manage notification settings ([#164](https://github.com/newmarcel/KeepingYouAwake/pull/164)) + - please note, this feature is only available on macOS 11 or newer; the previous experimental notifications support has been removed + ### v1.6.0 ### - raised minimum deployment target to macOS Sierra ([#142](https://github.com/newmarcel/KeepingYouAwake/pull/142)) diff --git a/Configuration.xcconfig b/Configuration.xcconfig index d44a4abc..54ca9eb0 100644 --- a/Configuration.xcconfig +++ b/Configuration.xcconfig @@ -9,8 +9,8 @@ MACOSX_DEPLOYMENT_TARGET = 10.12 PRODUCT_BUNDLE_IDENTIFIER = info.marcel-dierkes.KeepingYouAwake -MARKETING_VERSION = 1.6.0 -CURRENT_PROJECT_VERSION = 1060001 +MARKETING_VERSION = 1.6.1beta1 +CURRENT_PROJECT_VERSION = 1060100 KYA_COPYRIGHT_TEXT = Copyright © 2014 – 2021 Marcel Dierkes. All rights reserved. KYA_APPCAST_FEED_URL = newmarcel.github.io/KeepingYouAwake/appcast.xml diff --git a/Gymfile b/Gymfile deleted file mode 100644 index b067403c..00000000 --- a/Gymfile +++ /dev/null @@ -1,9 +0,0 @@ -clean true -silent true - -export_options( - method: "developer-id", - signingStyle: "manual", - teamID: "5KESHV9W85", - signingCertificate: "Developer ID Application" -) diff --git a/KeepingYouAwake/Extensions/NSApplication+KYALauncher.h b/KYAKit/Extensions/NSApplication+KYALauncher.h similarity index 100% rename from KeepingYouAwake/Extensions/NSApplication+KYALauncher.h rename to KYAKit/Extensions/NSApplication+KYALauncher.h diff --git a/KeepingYouAwake/Extensions/NSApplication+KYALauncher.m b/KYAKit/Extensions/NSApplication+KYALauncher.m similarity index 82% rename from KeepingYouAwake/Extensions/NSApplication+KYALauncher.m rename to KYAKit/Extensions/NSApplication+KYALauncher.m index 68f6d63e..2d4ad378 100644 --- a/KeepingYouAwake/Extensions/NSApplication+KYALauncher.m +++ b/KYAKit/Extensions/NSApplication+KYALauncher.m @@ -17,7 +17,8 @@ @implementation NSApplication (KYALauncher) - (BOOL)kya_isLaunchAtLoginEnabled { - BOOL isEnabled = [NSUserDefaults.standardUserDefaults boolForKey:KYALauncherStateUserDefaultsKey]; + Auto defaults = NSUserDefaults.standardUserDefaults; + BOOL isEnabled = [defaults boolForKey:KYALauncherStateUserDefaultsKey]; Boolean success = SMLoginItemSetEnabled((__bridge CFStringRef)KYALauncherBundleIdentifier, (Boolean)isEnabled); if(success == false) { @@ -37,7 +38,8 @@ - (void)setKya_launchAtLoginEnabled:(BOOL)launchAtLoginEnabled Boolean success = SMLoginItemSetEnabled((__bridge CFStringRef)KYALauncherBundleIdentifier, (Boolean)launchAtLoginEnabled); if(success == true) { - [NSUserDefaults.standardUserDefaults setBool:launchAtLoginEnabled forKey:KYALauncherStateUserDefaultsKey]; + Auto defaults = NSUserDefaults.standardUserDefaults; + [defaults setBool:launchAtLoginEnabled forKey:KYALauncherStateUserDefaultsKey]; } else { diff --git a/KYAKit/Extensions/NSBundle+KYAUpdateFeed.h b/KYAKit/Extensions/NSBundle+KYAUpdateFeed.h new file mode 100644 index 00000000..01cdbf81 --- /dev/null +++ b/KYAKit/Extensions/NSBundle+KYAUpdateFeed.h @@ -0,0 +1,18 @@ +// +// NSBundle+KYAUpdateFeed.h +// KYAKit +// +// Created by Marcel Dierkes on 26.02.21. +// Copyright © 2021 Marcel Dierkes. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSBundle (KYAUpdateFeed) +@property (nonatomic, readonly) NSString *kya_updateFeedURLString; +@property (nonatomic, readonly) NSString *kya_preReleaseUpdateFeedURLString; +@end + +NS_ASSUME_NONNULL_END diff --git a/KYAKit/Extensions/NSBundle+KYAUpdateFeed.m b/KYAKit/Extensions/NSBundle+KYAUpdateFeed.m new file mode 100644 index 00000000..e3e9db4a --- /dev/null +++ b/KYAKit/Extensions/NSBundle+KYAUpdateFeed.m @@ -0,0 +1,33 @@ +// +// NSBundle+KYAUpdateFeed.m +// KYAKit +// +// Created by Marcel Dierkes on 26.02.21. +// Copyright © 2021 Marcel Dierkes. All rights reserved. +// + +#import "NSBundle+KYAUpdateFeed.h" +#import "KYADefines.h" + +static NSString * const KYAUpdateFeedKey = @"SUFeedURL"; + +@implementation NSBundle (KYAUpdateFeed) + +- (NSString *)kya_updateFeedURLString +{ + Auto feedURLString = (NSString *)self.infoDictionary[KYAUpdateFeedKey]; + NSAssert(feedURLString != nil, @"A feed URL should be set in Info.plist"); + + return feedURLString; +} + +- (NSString *)kya_preReleaseUpdateFeedURLString +{ + Auto feedURLString = self.kya_updateFeedURLString; + Auto lastComponent = feedURLString.lastPathComponent; + Auto baseURLString = feedURLString.stringByDeletingLastPathComponent; + + return [NSString stringWithFormat:@"%@/prerelease-%@", baseURLString, lastComponent]; +} + +@end diff --git a/KeepingYouAwake/Extensions/NSApplication+Versions.h b/KYAKit/Extensions/NSBundle+KYAVersion.h similarity index 63% rename from KeepingYouAwake/Extensions/NSApplication+Versions.h rename to KYAKit/Extensions/NSBundle+KYAVersion.h index 1b0f14da..e73ab853 100644 --- a/KeepingYouAwake/Extensions/NSApplication+Versions.h +++ b/KYAKit/Extensions/NSBundle+KYAVersion.h @@ -1,16 +1,16 @@ // -// NSApplication+Versions.h -// KeepingYouAwake +// NSBundle+KYAVersion.h +// KYAKit // -// Created by Marcel Dierkes on 18.12.15. -// Copyright © 2015 Marcel Dierkes. All rights reserved. +// Created by Marcel Dierkes on 30.03.21. +// Copyright © 2021 Marcel Dierkes. All rights reserved. // -#import +#import NS_ASSUME_NONNULL_BEGIN -@interface NSApplication (Versions) +@interface NSBundle (KYAVersion) @property (copy, nonatomic, readonly) NSString *kya_shortVersionString; @property (copy, nonatomic, readonly) NSString *kya_buildVersionString; @property (copy, nonatomic, readonly) NSString *kya_localizedVersionString; diff --git a/KYAKit/Extensions/NSBundle+KYAVersion.m b/KYAKit/Extensions/NSBundle+KYAVersion.m new file mode 100644 index 00000000..e81e79ae --- /dev/null +++ b/KYAKit/Extensions/NSBundle+KYAVersion.m @@ -0,0 +1,44 @@ +// +// NSBundle+KYAVersion.m +// KYAKit +// +// Created by Marcel Dierkes on 30.03.21. +// Copyright © 2021 Marcel Dierkes. All rights reserved. +// + +#import "NSBundle+KYAVersion.h" +#import "KYADefines.h" +#import "KYAKitLocalizedStrings.h" + +static NSString * const KYAShortVersionKey = @"CFBundleShortVersionString"; +static NSString * const KYABundleVersionKey = @"CFBundleVersion"; +static NSString * const KYACopyrightKey = @"NSHumanReadableCopyright"; + +@implementation NSBundle (KYAVersion) + +- (NSString *)kya_shortVersionString +{ + return self.infoDictionary[KYAShortVersionKey]; +} + +- (NSString *)kya_buildVersionString +{ + return self.infoDictionary[KYABundleVersionKey]; +} + +- (NSString *)kya_localizedVersionString +{ + return [NSString stringWithFormat:@"%@ %@ (%@)", + KYA_L10N_VERSION, + self.kya_shortVersionString, + self.kya_buildVersionString]; +} + +#pragma mark - Copyright String + +- (NSString *)kya_localizedCopyrightString +{ + return self.infoDictionary[KYACopyrightKey]; +} + +@end diff --git a/KeepingYouAwake/Extensions/NSDate+RemainingTime.h b/KYAKit/Extensions/NSDate+RemainingTime.h similarity index 100% rename from KeepingYouAwake/Extensions/NSDate+RemainingTime.h rename to KYAKit/Extensions/NSDate+RemainingTime.h diff --git a/KeepingYouAwake/Extensions/NSDate+RemainingTime.m b/KYAKit/Extensions/NSDate+RemainingTime.m similarity index 74% rename from KeepingYouAwake/Extensions/NSDate+RemainingTime.m rename to KYAKit/Extensions/NSDate+RemainingTime.m index 6b073101..2888e0f5 100644 --- a/KeepingYouAwake/Extensions/NSDate+RemainingTime.m +++ b/KYAKit/Extensions/NSDate+RemainingTime.m @@ -27,14 +27,16 @@ - (NSDateComponentsFormatter *)dateComponentsFormatter - (NSString *)kya_localizedRemainingTime { - return [[self dateComponentsFormatter] stringFromDate:[NSDate date] toDate:self]; + Auto startDate = [NSDate dateWithTimeIntervalSinceNow:-1]; + return [[self dateComponentsFormatter] stringFromDate:startDate toDate:self]; } - (NSString *)kya_localizedRemainingTimeWithoutPhrase { - KYA_AUTO formatter = [self dateComponentsFormatter]; + Auto formatter = [self dateComponentsFormatter]; formatter.includesTimeRemainingPhrase = NO; - KYA_AUTO remainingTimeString = [formatter stringFromDate:[NSDate date] toDate:self]; + Auto startDate = [NSDate dateWithTimeIntervalSinceNow:-1]; + Auto remainingTimeString = [formatter stringFromDate:startDate toDate:self]; formatter.includesTimeRemainingPhrase = YES; return remainingTimeString; diff --git a/KeepingYouAwake/Extensions/NSUserDefaults+Keys.h b/KYAKit/Extensions/NSUserDefaults+Keys.h similarity index 91% rename from KeepingYouAwake/Extensions/NSUserDefaults+Keys.h rename to KYAKit/Extensions/NSUserDefaults+Keys.h index 20532495..69d83fdc 100644 --- a/KeepingYouAwake/Extensions/NSUserDefaults+Keys.h +++ b/KYAKit/Extensions/NSUserDefaults+Keys.h @@ -12,7 +12,6 @@ NS_ASSUME_NONNULL_BEGIN // User Default Keys FOUNDATION_EXPORT NSString * const KYAUserDefaultsKeyActivateOnLaunch; -FOUNDATION_EXPORT NSString * const KYAUserDefaultsKeyNotificationsEnabled; FOUNDATION_EXPORT NSString * const KYAUserDefaultsKeyDefaultTimeInterval; FOUNDATION_EXPORT NSString * const KYAUserDefaultsKeyAllowDisplaySleep; FOUNDATION_EXPORT NSString * const KYAUserDefaultsKeyMenuBarIconHighlightDisabled; @@ -28,11 +27,6 @@ FOUNDATION_EXPORT NSString * const KYAUserDefaultsKeyPreReleaseUpdatesEnabled; */ @property (nonatomic, getter = kya_isActivatedOnLaunch) BOOL kya_activateOnLaunch; -/** - Returns YES if user notifications should be displayed. - */ -@property (nonatomic, getter = kya_areNotificationsEnabled) BOOL kya_notificationsEnabled; - /** Returns the default time interval for the sleep wake timer. */ diff --git a/KeepingYouAwake/Extensions/NSUserDefaults+Keys.m b/KYAKit/Extensions/NSUserDefaults+Keys.m similarity index 89% rename from KeepingYouAwake/Extensions/NSUserDefaults+Keys.m rename to KYAKit/Extensions/NSUserDefaults+Keys.m index 9d5c41b3..de9b6d3d 100644 --- a/KeepingYouAwake/Extensions/NSUserDefaults+Keys.m +++ b/KYAKit/Extensions/NSUserDefaults+Keys.m @@ -7,10 +7,10 @@ // #import "NSUserDefaults+Keys.h" +#import "KYADefines.h" // User Default Keys NSString * const KYAUserDefaultsKeyActivateOnLaunch = @"info.marcel-dierkes.KeepingYouAwake.ActivateOnLaunch"; -NSString * const KYAUserDefaultsKeyNotificationsEnabled = @"info.marcel-dierkes.KeepingYouAwake.NotificationsEnabled"; NSString * const KYAUserDefaultsKeyDefaultTimeInterval = @"info.marcel-dierkes.KeepingYouAwake.TimeInterval"; NSString * const KYAUserDefaultsKeyAllowDisplaySleep = @"info.marcel-dierkes.KeepingYouAwake.AllowDisplaySleep"; NSString * const KYAUserDefaultsKeyMenuBarIconHighlightDisabled = @"info.marcel-dierkes.KeepingYouAwake.MenuBarIconHighlightDisabled"; @@ -21,7 +21,7 @@ NSString * const KYAUserDefaultsKeyPreReleaseUpdatesEnabled = @"info.marcel-dierkes.KeepingYouAwake.PreReleaseUpdatesEnabled"; @implementation NSUserDefaults (Keys) -@dynamic kya_activateOnLaunch, kya_defaultTimeInterval, kya_notificationsEnabled; +@dynamic kya_activateOnLaunch, kya_defaultTimeInterval; @dynamic kya_allowDisplaySleep; @dynamic kya_menuBarIconHighlightDisabled; @dynamic kya_batteryCapacityThresholdEnabled, kya_batteryCapacityThreshold; @@ -40,18 +40,6 @@ - (void)setKya_activateOnLaunch:(BOOL)activateOnLaunch [self setBool:activateOnLaunch forKey:KYAUserDefaultsKeyActivateOnLaunch]; } -#pragma mark - Notifications Enabled - -- (BOOL)kya_areNotificationsEnabled -{ - return [self boolForKey:KYAUserDefaultsKeyNotificationsEnabled]; -} - -- (void)setKya_notificationsEnabled:(BOOL)notificationsEnabled -{ - [self setBool:notificationsEnabled forKey:KYAUserDefaultsKeyNotificationsEnabled]; -} - #pragma mark - Default Time Interval - (NSTimeInterval)kya_defaultTimeInterval diff --git a/KYAKit/Info.plist b/KYAKit/Info.plist new file mode 100644 index 00000000..c0701c6d --- /dev/null +++ b/KYAKit/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/KeepingYouAwake/KYAActivationDurationsController/KYAActivationDuration.h b/KYAKit/KYAActivationDuration/KYAActivationDuration.h similarity index 100% rename from KeepingYouAwake/KYAActivationDurationsController/KYAActivationDuration.h rename to KYAKit/KYAActivationDuration/KYAActivationDuration.h diff --git a/KeepingYouAwake/KYAActivationDurationsController/KYAActivationDuration.mm b/KYAKit/KYAActivationDuration/KYAActivationDuration.mm similarity index 99% rename from KeepingYouAwake/KYAActivationDurationsController/KYAActivationDuration.mm rename to KYAKit/KYAActivationDuration/KYAActivationDuration.mm index 4aba10e3..e8b8cdc2 100644 --- a/KeepingYouAwake/KYAActivationDurationsController/KYAActivationDuration.mm +++ b/KYAKit/KYAActivationDuration/KYAActivationDuration.mm @@ -8,7 +8,7 @@ #import "KYAActivationDuration.h" #import "KYADefines.h" -#import "KYALocalizedStrings.h" +#import "KYAKitLocalizedStrings.h" #include NSTimeInterval const KYAActivationDurationIndefinite = 0.0f; diff --git a/KeepingYouAwake/KYAActivationDurationsController/KYAActivationDurationsController.h b/KYAKit/KYAActivationDurationsController/KYAActivationDurationsController.h similarity index 97% rename from KeepingYouAwake/KYAActivationDurationsController/KYAActivationDurationsController.h rename to KYAKit/KYAActivationDurationsController/KYAActivationDurationsController.h index ccabf64e..b581c109 100644 --- a/KeepingYouAwake/KYAActivationDurationsController/KYAActivationDurationsController.h +++ b/KYAKit/KYAActivationDurationsController/KYAActivationDurationsController.h @@ -7,7 +7,7 @@ // #import -#import "KYAActivationDuration.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/KeepingYouAwake/KYAActivationDurationsController/KYAActivationDurationsController.m b/KYAKit/KYAActivationDurationsController/KYAActivationDurationsController.m similarity index 99% rename from KeepingYouAwake/KYAActivationDurationsController/KYAActivationDurationsController.m rename to KYAKit/KYAActivationDurationsController/KYAActivationDurationsController.m index 8613d403..dfbe02a0 100644 --- a/KeepingYouAwake/KYAActivationDurationsController/KYAActivationDurationsController.m +++ b/KYAKit/KYAActivationDurationsController/KYAActivationDurationsController.m @@ -8,7 +8,6 @@ #import "KYAActivationDurationsController.h" #import "KYADefines.h" -#include "NSUserDefaults+Keys.h" #define KYA_USES_SIMPLE_USER_DEFAULTS_VALUES 1 diff --git a/KeepingYouAwake/Battery Status/KYABatteryStatus.h b/KYAKit/KYABatteryStatus/KYABatteryStatus.h similarity index 100% rename from KeepingYouAwake/Battery Status/KYABatteryStatus.h rename to KYAKit/KYABatteryStatus/KYABatteryStatus.h diff --git a/KeepingYouAwake/Battery Status/KYABatteryStatus.m b/KYAKit/KYABatteryStatus/KYABatteryStatus.m similarity index 74% rename from KeepingYouAwake/Battery Status/KYABatteryStatus.m rename to KYAKit/KYABatteryStatus/KYABatteryStatus.m index c42dcef7..902b846e 100644 --- a/KeepingYouAwake/Battery Status/KYABatteryStatus.m +++ b/KYAKit/KYABatteryStatus/KYABatteryStatus.m @@ -27,27 +27,27 @@ - (void)dealloc - (BOOL)isBatteryStatusAvailable { - KYA_AUTO powerSourceInfos = [self powerSourceInfos]; + Auto powerSourceInfos = [self powerSourceInfos]; if(powerSourceInfos == nil) { return NO; } - KYA_AUTO key = [NSString stringWithUTF8String:kIOPSTypeKey]; - KYA_AUTO internalBatteryTypeKey = [NSString stringWithUTF8String:kIOPSInternalBatteryType]; + Auto key = [NSString stringWithUTF8String:kIOPSTypeKey]; + Auto internalBatteryTypeKey = [NSString stringWithUTF8String:kIOPSInternalBatteryType]; NSString *batteryType = powerSourceInfos[key]; return [batteryType isEqualToString:internalBatteryTypeKey]; } - (CGFloat)currentCapacity { - KYA_AUTO powerSourceInfos = [self powerSourceInfos]; + Auto powerSourceInfos = [self powerSourceInfos]; if(powerSourceInfos == nil) { return KYABatteryStatusUnavailable; } - KYA_AUTO key = [NSString stringWithUTF8String:kIOPSCurrentCapacityKey]; + Auto key = [NSString stringWithUTF8String:kIOPSCurrentCapacityKey]; NSNumber *capacity = powerSourceInfos[key]; if(capacity == nil) { @@ -59,8 +59,8 @@ - (CGFloat)currentCapacity - (nullable NSDictionary *)powerSourceInfos { - KYA_AUTO blob = IOPSCopyPowerSourcesInfo(); - KYA_AUTO sourcesList = IOPSCopyPowerSourcesList(blob); + Auto blob = IOPSCopyPowerSourcesInfo(); + Auto sourcesList = IOPSCopyPowerSourcesList(blob); CFRelease(blob); if(CFArrayGetCount(sourcesList) == 0) { @@ -68,7 +68,7 @@ - (nullable NSDictionary *)powerSourceInfos return nil; } - KYA_AUTO powerSource = IOPSGetPowerSourceDescription(blob, CFArrayGetValueAtIndex(sourcesList, 0)); + Auto powerSource = IOPSGetPowerSourceDescription(blob, CFArrayGetValueAtIndex(sourcesList, 0)); CFRetain(powerSource); CFRelease(sourcesList); @@ -85,7 +85,7 @@ - (void)registerForCapacityChangesIfNeeded return; } - KYA_AUTO runLoopSource = IOPSNotificationCreateRunLoopSource(KYABatteryStatusChangeHandler, (__bridge void *)self); + Auto runLoopSource = IOPSNotificationCreateRunLoopSource(KYABatteryStatusChangeHandler, (__bridge void *)self); CFRunLoopAddSource(CFRunLoopGetCurrent(), runLoopSource, kCFRunLoopDefaultMode); self.runLoopSource = runLoopSource; @@ -109,7 +109,7 @@ - (void)unregisterFromCapacityChanges static void KYABatteryStatusChangeHandler(void *context) { - KYA_AUTO batteryStatus = (__bridge KYABatteryStatus *)context; + Auto batteryStatus = (__bridge KYABatteryStatus *)context; if(batteryStatus.capacityChangeHandler) { batteryStatus.capacityChangeHandler(batteryStatus.currentCapacity); diff --git a/KeepingYouAwake/Event Handler/KYAEvent.h b/KYAKit/KYAEventHandler/KYAEvent.h similarity index 86% rename from KeepingYouAwake/Event Handler/KYAEvent.h rename to KYAKit/KYAEventHandler/KYAEvent.h index 64e6a7a7..d1761e4c 100644 --- a/KeepingYouAwake/Event Handler/KYAEvent.h +++ b/KYAKit/KYAEventHandler/KYAEvent.h @@ -33,7 +33,8 @@ NS_ASSUME_NONNULL_BEGIN * * @return A new instance. */ -- (instancetype)initWithName:(NSString *)name arguments:(nullable NSDictionary *)arguments; +- (instancetype)initWithName:(NSString *)name + arguments:(nullable NSDictionary *)arguments; - (BOOL)isEqualToEvent:(nullable KYAEvent *)event; diff --git a/KeepingYouAwake/Event Handler/KYAEvent.m b/KYAKit/KYAEventHandler/KYAEvent.m similarity index 81% rename from KeepingYouAwake/Event Handler/KYAEvent.m rename to KYAKit/KYAEventHandler/KYAEvent.m index 19dd5559..d45dea77 100644 --- a/KeepingYouAwake/Event Handler/KYAEvent.m +++ b/KYAKit/KYAEventHandler/KYAEvent.m @@ -9,11 +9,10 @@ #import "KYAEvent.h" @interface KYAEvent () -@property (copy, nonatomic, readwrite, nonnull) NSString *name; +@property (copy, nonatomic, readwrite) NSString *name; @property (copy, nonatomic, readwrite, nullable) NSDictionary *arguments; @end - @implementation KYAEvent #pragma mark - Life Cycle @@ -35,14 +34,19 @@ - (instancetype)initWithName:(NSString *)name arguments:(NSDictionary *)argument - (NSString *)description { - return [NSString stringWithFormat:@"%@: {\n\tname: %@,\n\targuments: %@\n}", [super description], self.name, self.arguments]; + return [NSString stringWithFormat:@"%@: {\n\tname: %@,\n\targuments: %@\n}", + [super description], + self.name, + self.arguments]; } #pragma mark - Equatable - (BOOL)isEqualToEvent:(KYAEvent *)event { - return event && [self.name isEqual:event.name] && [self.arguments isEqual:event.arguments]; + return event + && [self.name isEqual:event.name] + && [self.arguments isEqual:event.arguments]; } - (BOOL)isEqual:(id)object diff --git a/KeepingYouAwake/Event Handler/KYAEventHandler.h b/KYAKit/KYAEventHandler/KYAEventHandler.h similarity index 87% rename from KeepingYouAwake/Event Handler/KYAEventHandler.h rename to KYAKit/KYAEventHandler/KYAEventHandler.h index 9a661651..f6dba775 100644 --- a/KeepingYouAwake/Event Handler/KYAEventHandler.h +++ b/KYAKit/KYAEventHandler/KYAEventHandler.h @@ -7,7 +7,7 @@ // #import -#import "KYAEvent.h" +#import NS_ASSUME_NONNULL_BEGIN @@ -27,7 +27,8 @@ typedef void(^KYAEventHandlerActionBlock)(KYAEvent *event); @param actionName An action identifier. @param block A block. */ -- (void)registerActionNamed:(NSString *)actionName block:(KYAEventHandlerActionBlock)block; +- (void)registerActionNamed:(NSString *)actionName + block:(KYAEventHandlerActionBlock)block; /** Removes the registered action and block with the supplied actionName. diff --git a/KeepingYouAwake/Event Handler/KYAEventHandler.m b/KYAKit/KYAEventHandler/KYAEventHandler.m similarity index 83% rename from KeepingYouAwake/Event Handler/KYAEventHandler.m rename to KYAKit/KYAEventHandler/KYAEventHandler.m index 00fbcd53..5dcbbf48 100644 --- a/KeepingYouAwake/Event Handler/KYAEventHandler.m +++ b/KYAKit/KYAEventHandler/KYAEventHandler.m @@ -8,14 +8,12 @@ #import "KYAEventHandler.h" #import "KYADefines.h" -#import "KYAEvent.h" @interface KYAEventHandler () -@property (strong, nonatomic) dispatch_queue_t eventQueue; -@property (strong, nonatomic) NSMapTable *eventTable; +@property (nonatomic) dispatch_queue_t eventQueue; +@property (nonatomic) NSMapTable *eventTable; @end - @implementation KYAEventHandler #pragma mark - Singleton @@ -59,7 +57,7 @@ - (void)handleEventForURL:(NSURL *)URL KYA_WEAK weakSelf = self; dispatch_async(self.eventQueue, ^{ - KYA_AUTO event = [weakSelf eventForURL:URL]; + Auto event = [weakSelf eventForURL:URL]; KYAEventHandlerActionBlock actionBlock = [self.eventTable objectForKey:event.name]; if(actionBlock) @@ -75,14 +73,14 @@ - (void)handleEventForURL:(NSURL *)URL - (nullable KYAEvent *)eventForURL:(nonnull NSURL *)URL { - KYA_AUTO URLComponents = [NSURLComponents componentsWithURL:URL resolvingAgainstBaseURL:YES]; - KYA_AUTO path = URL.lastPathComponent; + Auto URLComponents = [NSURLComponents componentsWithURL:URL resolvingAgainstBaseURL:YES]; + Auto path = URL.lastPathComponent; // Destructure NSURLQueryItems into basic dictionary values - KYA_AUTO arguments = [NSMutableDictionary dictionary]; + Auto arguments = [NSMutableDictionary dictionary]; for(NSURLQueryItem *queryItem in URLComponents.queryItems) { - KYA_AUTO_VAR value = queryItem.value; + AutoVar value = queryItem.value; if(!value) { // fall back to an empty string if the value is nil diff --git a/KYAKit/KYAKit.h b/KYAKit/KYAKit.h new file mode 100644 index 00000000..a9e73270 --- /dev/null +++ b/KYAKit/KYAKit.h @@ -0,0 +1,31 @@ +// +// KYAKit.h +// KYAKit +// +// Created by Marcel Dierkes on 26.02.21. +// Copyright © 2021 Marcel Dierkes. All rights reserved. +// + +#import + +/// Project version number for KYAKit. +FOUNDATION_EXPORT double KYAKitVersionNumber; + +/// Project version string for KYAKit. +FOUNDATION_EXPORT const unsigned char KYAKitVersionString[]; + +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import diff --git a/KYAKit/KYAKitLocalizedStrings.h b/KYAKit/KYAKitLocalizedStrings.h new file mode 100644 index 00000000..f26b2979 --- /dev/null +++ b/KYAKit/KYAKitLocalizedStrings.h @@ -0,0 +1,19 @@ +// +// KYAKitLocalizedStrings.h +// KeepingYouAwake +// +// Created by Marcel Dierkes on 05.03.21. +// Copyright © 2021 Marcel Dierkes. All rights reserved. +// + +#import + +#define KYA_LOCALIZED_STRING(__key, __comment) \ + NSLocalizedStringFromTableInBundle( \ + __key, nil, \ + [NSBundle bundleForClass:NSClassFromString(@"KYAEvent")], \ + __comment) + +#define KYA_L10N_INDEFINITELY KYA_LOCALIZED_STRING(@"Indefinitely", @"Indefinitely") + +#define KYA_L10N_VERSION KYA_LOCALIZED_STRING(@"Version", @"Version") diff --git a/KeepingYouAwake/KYASleepWakeTimer/KYASleepWakeTimer.h b/KYAKit/KYASleepWakeTimer/KYASleepWakeTimer.h similarity index 98% rename from KeepingYouAwake/KYASleepWakeTimer/KYASleepWakeTimer.h rename to KYAKit/KYASleepWakeTimer/KYASleepWakeTimer.h index 5d47276b..878407f9 100644 --- a/KeepingYouAwake/KYASleepWakeTimer/KYASleepWakeTimer.h +++ b/KYAKit/KYASleepWakeTimer/KYASleepWakeTimer.h @@ -7,6 +7,7 @@ // #import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/KeepingYouAwake/KYASleepWakeTimer/KYASleepWakeTimer.m b/KYAKit/KYASleepWakeTimer/KYASleepWakeTimer.m similarity index 75% rename from KeepingYouAwake/KYASleepWakeTimer/KYASleepWakeTimer.m rename to KYAKit/KYASleepWakeTimer/KYASleepWakeTimer.m index 2861ee7f..0e117ff9 100644 --- a/KeepingYouAwake/KYASleepWakeTimer/KYASleepWakeTimer.m +++ b/KYAKit/KYASleepWakeTimer/KYASleepWakeTimer.m @@ -8,15 +8,13 @@ #import "KYASleepWakeTimer.h" #import "KYADefines.h" -#import "NSUserDefaults+Keys.h" NSTimeInterval const KYASleepWakeTimeIntervalIndefinite = 0; @interface KYASleepWakeTimer () @property (copy, nonatomic, readwrite) NSDate *fireDate; -@property (assign, nonatomic, readwrite) NSTimeInterval scheduledTimeInterval; - -@property (strong, nonatomic) NSTask *caffeinateTask; +@property (nonatomic, readwrite) NSTimeInterval scheduledTimeInterval; +@property (nonatomic) NSTask *caffeinateTask; @end @implementation KYASleepWakeTimer @@ -28,12 +26,13 @@ - (instancetype)init { // Terminate all remaining tasks on app quit KYA_WEAK weakSelf = self; - [NSNotificationCenter.defaultCenter addObserverForName:NSApplicationWillTerminateNotification - object:nil - queue:nil - usingBlock:^(NSNotification *note) { - [weakSelf invalidate]; - }]; + Auto center = NSNotificationCenter.defaultCenter; + [center addObserverForName:NSApplicationWillTerminateNotification + object:nil + queue:nil + usingBlock:^(NSNotification *note) { + [weakSelf invalidate]; + }]; } return self; } @@ -84,8 +83,9 @@ - (BOOL)isScheduled - (void)spawnCaffeinateTaskForTimeInterval:(NSTimeInterval)timeInterval { - NSMutableArray *arguments = [NSMutableArray new]; - if([NSUserDefaults.standardUserDefaults kya_shouldAllowDisplaySleep]) + Auto defaults = NSUserDefaults.standardUserDefaults; + Auto arguments = [NSMutableArray new]; + if([defaults kya_shouldAllowDisplaySleep]) { [arguments addObject:@"-i"]; } @@ -99,10 +99,12 @@ - (void)spawnCaffeinateTaskForTimeInterval:(NSTimeInterval)timeInterval [arguments addObject:[NSString stringWithFormat:@"-t %.f", timeInterval]]; } - [arguments addObject:[NSString stringWithFormat:@"-w %i", [[NSProcessInfo processInfo] processIdentifier]]]; + [arguments addObject:[NSString stringWithFormat:@"-w %i", + NSProcessInfo.processInfo.processIdentifier]]; [self willChangeValueForKey:@"scheduled"]; - self.caffeinateTask = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/caffeinate" arguments:[arguments copy]]; + self.caffeinateTask = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/caffeinate" + arguments:[arguments copy]]; // Termination Handler KYA_WEAK weakSelf = self; diff --git a/KYAKit/KYAUserNotificationCenter/Extensions/NSURL+KYAUserNotificationCenter.h b/KYAKit/KYAUserNotificationCenter/Extensions/NSURL+KYAUserNotificationCenter.h new file mode 100644 index 00000000..87cd0a5f --- /dev/null +++ b/KYAKit/KYAUserNotificationCenter/Extensions/NSURL+KYAUserNotificationCenter.h @@ -0,0 +1,16 @@ +// +// NSURL+KYAUserNotificationCenter.h +// KYAKit +// +// Created by Marcel Dierkes on 20.02.21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSURL (KYAUserNotificationCenter) +@property (class, nonatomic, readonly) NSURL *kya_notificationPreferencesURL; +@end + +NS_ASSUME_NONNULL_END diff --git a/KYAKit/KYAUserNotificationCenter/Extensions/NSURL+KYAUserNotificationCenter.m b/KYAKit/KYAUserNotificationCenter/Extensions/NSURL+KYAUserNotificationCenter.m new file mode 100644 index 00000000..552f8282 --- /dev/null +++ b/KYAKit/KYAUserNotificationCenter/Extensions/NSURL+KYAUserNotificationCenter.m @@ -0,0 +1,18 @@ +// +// NSURL+KYAUserNotificationCenter.m +// KYAKit +// +// Created by Marcel Dierkes on 20.02.21. +// + +#import "NSURL+KYAUserNotificationCenter.h" +#import "KYADefines.h" + +@implementation NSURL (KYAUserNotificationCenter) + ++ (NSURL *)kya_notificationPreferencesURL +{ + return [self URLWithString:@"x-apple.systempreferences:com.apple.preference.notifications"]; +} + +@end diff --git a/KYAKit/KYAUserNotificationCenter/Extensions/NSWorkspace+KYAUserNotificationCenter.h b/KYAKit/KYAUserNotificationCenter/Extensions/NSWorkspace+KYAUserNotificationCenter.h new file mode 100644 index 00000000..bb96e8e4 --- /dev/null +++ b/KYAKit/KYAUserNotificationCenter/Extensions/NSWorkspace+KYAUserNotificationCenter.h @@ -0,0 +1,23 @@ +// +// NSWorkspace+KYAUserNotificationCenter.h +// KYAKit +// +// Created by Marcel Dierkes on 20.02.21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^KYAOpenNotificationsCompletionHandler)(NSRunningApplication *_Nullable, + NSError *_Nullable); + +@interface NSWorkspace (KYAUserNotificationCenter) + +/// Opens the notifications pane in System Preferences. +/// @param completionHandler An optional completion handler, called on a private queue +- (void)kya_openNotificationPreferencesWithCompletionHandler:(nullable KYAOpenNotificationsCompletionHandler)completionHandler API_AVAILABLE(macos(11.0)); + +@end + +NS_ASSUME_NONNULL_END diff --git a/KYAKit/KYAUserNotificationCenter/Extensions/NSWorkspace+KYAUserNotificationCenter.m b/KYAKit/KYAUserNotificationCenter/Extensions/NSWorkspace+KYAUserNotificationCenter.m new file mode 100644 index 00000000..eb24fbf6 --- /dev/null +++ b/KYAKit/KYAUserNotificationCenter/Extensions/NSWorkspace+KYAUserNotificationCenter.m @@ -0,0 +1,30 @@ +// +// NSWorkspace+KYAUserNotificationCenter.m +// KYAKit +// +// Created by Marcel Dierkes on 20.02.21. +// + +#import "NSWorkspace+KYAUserNotificationCenter.h" +#import "KYADefines.h" +#import "NSURL+KYAUserNotificationCenter.h" + +@implementation NSWorkspace (KYAUserNotificationCenter) + +- (void)kya_openNotificationPreferencesWithCompletionHandler:(KYAOpenNotificationsCompletionHandler)completionHandler +{ + Auto prefURL = NSURL.kya_notificationPreferencesURL; + Auto config = [NSWorkspaceOpenConfiguration configuration]; + config.addsToRecentItems = NO; + + [self openApplicationAtURL:prefURL + configuration:config + completionHandler:^(NSRunningApplication *app, NSError *error) { + if(completionHandler != nil) + { + completionHandler(app, error); + } + }]; +} + +@end diff --git a/KYAKit/KYAUserNotificationCenter/KYAUserNotificationCenter.h b/KYAKit/KYAUserNotificationCenter/KYAUserNotificationCenter.h new file mode 100644 index 00000000..c210c158 --- /dev/null +++ b/KYAKit/KYAUserNotificationCenter/KYAUserNotificationCenter.h @@ -0,0 +1,111 @@ +// +// KYAUserNotificationCenter.h +// KYAKit +// +// Created by Marcel Dierkes on 13.02.21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class KYAUserNotification; + +/// Represents the current authorization status +/// for posting user notifications. +typedef NS_ENUM(NSUInteger, KYAUserNotificationAuthorizationStatus) +{ + /// The user has not been prompted for confirming the + /// user notification authorization status. + KYAUserNotificationAuthorizationStatusUndetermined = 0, + + /// The user has granted authorization for posting + /// user notifications. + KYAUserNotificationAuthorizationStatusGranted, + + /// The user denied authorization for posting user + /// notifications. + KYAUserNotificationAuthorizationStatusDenied, +}; + +typedef void(^KYAUserNotificationsAuthorizationCompletion)(KYAUserNotificationAuthorizationStatus, NSError *_Nullable); + +/// Manages authorization and posting of user notifications. +API_AVAILABLE(macos(11.0)) +@interface KYAUserNotificationCenter : NSObject +/// The primary user notification center. +/// @note Prefer using this object instead of creating new instances. +@property (class, nonatomic, readonly) KYAUserNotificationCenter *sharedCenter; + +/// Retrieves the current user notification authorization status. +/// @param completion A completion handler with the user's current +/// authorization status; returns on the main queue +- (void)getAuthorizationStatusWithCompletion:(void(^)(KYAUserNotificationAuthorizationStatus))completion; + +/// Requests authorization for posting user notifications. +/// @param completion An optional completion handler with the user's +/// authorization status; returns on the main queue +- (void)requestAuthorizationWithCompletion:(nullable KYAUserNotificationsAuthorizationCompletion)completion; + +/// A convenience method to request authorization for posting user +/// notifications when the user's authorization status is +/// `KYAUserNotificationAuthorizationStatusUndetermined`. +- (void)requestAuthorizationIfUndetermined; + +/// Posts a user notification if the user has granted authorization. +/// @param notification A user notification +- (void)postNotification:(__kindof KYAUserNotification *)notification; + +/// Removes all previously delivered user notifications from the +/// notification center. +- (void)clearAllDeliveredNotifications; + +@end + +/// A generic user notification object usable for creating +/// custom dedicated user notification subclasses. +API_AVAILABLE(macos(11.0)) +@interface KYAUserNotification : NSObject + +/// A unique notification identifier, used for grouping purposes. +@property (copy, nonatomic) NSString *identifier; + +/// A short reason description. +/// @note Use the custom `-setLocalizedTitleWithKey:arguments:` +/// instead for setting this property. +@property (copy, nonatomic, nullable) NSString *title; + +/// A short secondary reason description. +/// @note Use the custom `-setLocalizedSubtitleWithKey:arguments:` +/// instead for setting this property. +@property (copy, nonatomic, nullable) NSString *subtitle; + +/// The user notification message. +/// @note Use the custom `-setLocalizedBodyTextWithKey:arguments:` +/// instead for setting this property. +@property (copy, nonatomic, nullable) NSString *bodyText; + +/// Arbitrary custom information related to the user notification. +@property (copy, nonatomic, nullable) NSDictionary *userInfo; + +/// Sets the `title` value with a localization-aware string and arguments. +/// @param key A localized string key +/// @param arguments Optional localized string arguments +- (void)setLocalizedTitleWithKey:(NSString *)key + arguments:(nullable NSArray *)arguments; + +/// Sets the `subtitle` value with a localization-aware string and arguments. +/// @param key A localized string key +/// @param arguments Optional localized string arguments +- (void)setLocalizedSubtitleWithKey:(NSString *)key + arguments:(nullable NSArray *)arguments; + +/// Sets the `bodyText` value with a localization-aware string and arguments. +/// @param key A localized string key +/// @param arguments Optional localized string arguments +- (void)setLocalizedBodyTextWithKey:(NSString *)key + arguments:(nullable NSArray *)arguments; + +@end + +NS_ASSUME_NONNULL_END diff --git a/KYAKit/KYAUserNotificationCenter/KYAUserNotificationCenter.m b/KYAKit/KYAUserNotificationCenter/KYAUserNotificationCenter.m new file mode 100644 index 00000000..9fbb4d4e --- /dev/null +++ b/KYAKit/KYAUserNotificationCenter/KYAUserNotificationCenter.m @@ -0,0 +1,192 @@ +// +// KYAUserNotificationCenter.m +// KYAKit +// +// Created by Marcel Dierkes on 13.02.21. +// + +#import "KYAUserNotificationCenter.h" +#import +#import "KYADefines.h" + +@interface KYAUserNotificationCenter () +@property (nonatomic) UNUserNotificationCenter *center; +@end + +@interface KYAUserNotification () +- (UNNotificationContent *)createNotificationContent; +@end + +@implementation KYAUserNotificationCenter + ++ (instancetype)sharedCenter +{ + static dispatch_once_t once; + static KYAUserNotificationCenter *sharedCenter; + dispatch_once(&once, ^{ + sharedCenter = [self new]; + }); + return sharedCenter; +} + +- (instancetype)init +{ + return [self initWithUserNotificationCenter:UNUserNotificationCenter.currentNotificationCenter]; +} + +- (instancetype)initWithUserNotificationCenter:(UNUserNotificationCenter *)center +{ + NSParameterAssert(center); + self = [super init]; + if(self) + { + self.center = center; + } + return self; +} + +#pragma mark - Authorization Status + +- (void)getAuthorizationStatusWithCompletion:(void(^)(KYAUserNotificationAuthorizationStatus))completion +{ + NSParameterAssert(completion); + + [self.center getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings *settings) { + KYAUserNotificationAuthorizationStatus authStatus; + switch(settings.authorizationStatus) + { + case UNAuthorizationStatusNotDetermined: + authStatus = KYAUserNotificationAuthorizationStatusUndetermined; + break; + case UNAuthorizationStatusProvisional: + // fallthrough + case KYAUserNotificationAuthorizationStatusGranted: + authStatus = KYAUserNotificationAuthorizationStatusGranted; + break; + default: + authStatus = KYAUserNotificationAuthorizationStatusDenied; + break; + } + + dispatch_async(dispatch_get_main_queue(), ^{ + completion(authStatus); + }); + }]; +} + +- (void)requestAuthorizationWithCompletion:(KYAUserNotificationsAuthorizationCompletion)completion +{ + UNAuthorizationOptions options = UNAuthorizationOptionAlert | UNAuthorizationOptionProvisional; + [self.center requestAuthorizationWithOptions:options completionHandler:^(BOOL granted, NSError *error) { + KYAUserNotificationAuthorizationStatus status; + if(error != nil) + { + KYALog(@"Failed to request notification access: %@", error.userInfo); + status = KYAUserNotificationAuthorizationStatusDenied; + } + else if(granted == YES) + { + status = KYAUserNotificationAuthorizationStatusGranted; + } + else + { + status = KYAUserNotificationAuthorizationStatusUndetermined; + } + + if(completion != nil) + { + dispatch_async(dispatch_get_main_queue(), ^{ + completion(status, error); + }); + } + }]; +} + +- (void)requestAuthorizationIfUndetermined +{ + [self.center getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings *settings) { + if(settings.authorizationStatus == UNAuthorizationStatusNotDetermined) + { + [self requestAuthorizationWithCompletion:nil]; + } + }]; +} + +#pragma mark - Notification Handling + +- (void)clearAllDeliveredNotifications +{ + [self.center removeAllDeliveredNotifications]; +} + +- (void)postNotification:(__kindof KYAUserNotification *)notification +{ + NSParameterAssert(notification); + + Auto center = self.center; + [center getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings *settings) { + if(settings.authorizationStatus != UNAuthorizationStatusAuthorized + && settings.authorizationStatus != UNAuthorizationStatusProvisional) + { + KYALog(@"Posting notifications has not been authorized."); + return; + } + + if(settings.alertSetting == UNNotificationSettingEnabled) + { + Auto content = [notification createNotificationContent]; + Auto identifier = notification.identifier; + [self scheduleNotificationRequestWithIdentifier:identifier content:content]; + } + }]; +} + +- (void)scheduleNotificationRequestWithIdentifier:(NSString *)identifier content:(UNNotificationContent *)content +{ + NSParameterAssert(identifier); + NSParameterAssert(content); + + Auto request = [UNNotificationRequest requestWithIdentifier:identifier + content:content + trigger:nil]; + [self.center addNotificationRequest:request withCompletionHandler:^(NSError *error) { + if(error != nil) + { + KYALog(@"Failed to add notification request. %@", error.userInfo); + } + }]; +} + +@end + +@implementation KYAUserNotification + +- (void)setLocalizedTitleWithKey:(NSString *)key arguments:(nullable NSArray *)arguments +{ + self.title = [NSString localizedUserNotificationStringForKey:key arguments:arguments]; +} + +- (void)setLocalizedSubtitleWithKey:(NSString *)key arguments:(nullable NSArray *)arguments +{ + self.subtitle = [NSString localizedUserNotificationStringForKey:key arguments:arguments]; +} + +- (void)setLocalizedBodyTextWithKey:(NSString *)key arguments:(nullable NSArray *)arguments +{ + self.bodyText = [NSString localizedUserNotificationStringForKey:key arguments:arguments]; +} + +- (UNNotificationContent *)createNotificationContent +{ + Auto content = [UNMutableNotificationContent new]; + content.title = self.title; + content.subtitle = self.subtitle; + content.body = self.bodyText; + if(self.userInfo != nil) + { + content.userInfo = self.userInfo; + } + return [content copy]; +} + +@end diff --git a/KYAKit/da.lproj/Localizable.strings b/KYAKit/da.lproj/Localizable.strings new file mode 100644 index 00000000..3f0430f7 --- /dev/null +++ b/KYAKit/da.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "Ubestemt tid"; + +/* Version */ +"Version" = "Version"; + diff --git a/KYAKit/de.lproj/Localizable.strings b/KYAKit/de.lproj/Localizable.strings new file mode 100644 index 00000000..fab37a89 --- /dev/null +++ b/KYAKit/de.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "Unbegrenzt"; + +/* Version */ +"Version" = "Version"; + diff --git a/KYAKit/en.lproj/Localizable.strings b/KYAKit/en.lproj/Localizable.strings new file mode 100644 index 00000000..e8763c45 --- /dev/null +++ b/KYAKit/en.lproj/Localizable.strings @@ -0,0 +1,5 @@ +/* Indefinitely */ +"Indefinitely" = "Indefinitely"; + +/* Version */ +"Version" = "Version"; diff --git a/KYAKit/es.lproj/Localizable.strings b/KYAKit/es.lproj/Localizable.strings new file mode 100644 index 00000000..db5e0ad7 --- /dev/null +++ b/KYAKit/es.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "Indefinidamente"; + +/* Version */ +"Version" = "Versión"; + diff --git a/KYAKit/fr.lproj/Localizable.strings b/KYAKit/fr.lproj/Localizable.strings new file mode 100644 index 00000000..48cc8d85 --- /dev/null +++ b/KYAKit/fr.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "Indéfiniment"; + +/* Version */ +"Version" = "Version"; + diff --git a/KYAKit/id.lproj/Localizable.strings b/KYAKit/id.lproj/Localizable.strings new file mode 100644 index 00000000..ec26e200 --- /dev/null +++ b/KYAKit/id.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "Tanpa Batas"; + +/* Version */ +"Version" = "Versi"; + diff --git a/KYAKit/ko.lproj/Localizable.strings b/KYAKit/ko.lproj/Localizable.strings new file mode 100644 index 00000000..13e220c6 --- /dev/null +++ b/KYAKit/ko.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "무기한"; + +/* Version */ +"Version" = "Version"; + diff --git a/KYAKit/nl.lproj/Localizable.strings b/KYAKit/nl.lproj/Localizable.strings new file mode 100644 index 00000000..c004fffc --- /dev/null +++ b/KYAKit/nl.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "Onbepaalde duur"; + +/* Version */ +"Version" = "Versie"; + diff --git a/KYAKit/pl.lproj/Localizable.strings b/KYAKit/pl.lproj/Localizable.strings new file mode 100644 index 00000000..fa65d610 --- /dev/null +++ b/KYAKit/pl.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "Nieograniczony"; + +/* Version */ +"Version" = "Wersja"; + diff --git a/KYAKit/pt.lproj/Localizable.strings b/KYAKit/pt.lproj/Localizable.strings new file mode 100644 index 00000000..ccaa6974 --- /dev/null +++ b/KYAKit/pt.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "Indefinidamente"; + +/* Version */ +"Version" = "Versão"; + diff --git a/KYAKit/ru.lproj/Localizable.strings b/KYAKit/ru.lproj/Localizable.strings new file mode 100644 index 00000000..c9866294 --- /dev/null +++ b/KYAKit/ru.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "Неограниченно"; + +/* Version */ +"Version" = "Версия"; + diff --git a/KYAKit/tr.lproj/Localizable.strings b/KYAKit/tr.lproj/Localizable.strings new file mode 100644 index 00000000..7b9912d1 --- /dev/null +++ b/KYAKit/tr.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "Süresiz"; + +/* Version */ +"Version" = "Versiyon"; + diff --git a/KYAKit/zh-Hant-TW.lproj/Localizable.strings b/KYAKit/zh-Hant-TW.lproj/Localizable.strings new file mode 100644 index 00000000..ab9b3f7e --- /dev/null +++ b/KYAKit/zh-Hant-TW.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "永久"; + +/* Version */ +"Version" = "版本"; + diff --git a/KYAKit/zh.lproj/Localizable.strings b/KYAKit/zh.lproj/Localizable.strings new file mode 100644 index 00000000..46b7c12b --- /dev/null +++ b/KYAKit/zh.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* Indefinitely */ +"Indefinitely" = "无限期"; + +/* Version */ +"Version" = "版本"; + diff --git a/KYAKitTests/Info.plist b/KYAKitTests/Info.plist new file mode 100644 index 00000000..64d65ca4 --- /dev/null +++ b/KYAKitTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/KYAKitTests/KYAKitTests.m b/KYAKitTests/KYAKitTests.m new file mode 100644 index 00000000..f2a41004 --- /dev/null +++ b/KYAKitTests/KYAKitTests.m @@ -0,0 +1,16 @@ +// +// KYAKitTests.m +// KYAKitTests +// +// Created by Marcel Dierkes on 26.02.21. +// Copyright © 2021 Marcel Dierkes. All rights reserved. +// + +#import +#import + +@interface KYAKitTests : XCTestCase +@end + +@implementation KYAKitTests +@end diff --git a/KeepingYouAwake.xcodeproj/project.pbxproj b/KeepingYouAwake.xcodeproj/project.pbxproj index 512ebf88..66c2350c 100644 --- a/KeepingYouAwake.xcodeproj/project.pbxproj +++ b/KeepingYouAwake.xcodeproj/project.pbxproj @@ -14,47 +14,93 @@ DA0ADE6F21CBFCA700D34B9D /* org.sparkle-project.InstallerConnection.xpc in Embed XPC Services */ = {isa = PBXBuildFile; fileRef = DA0ADE6B21CBFC9700D34B9D /* org.sparkle-project.InstallerConnection.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; DA0ADE7021CBFCA700D34B9D /* org.sparkle-project.InstallerLauncher.xpc in Embed XPC Services */ = {isa = PBXBuildFile; fileRef = DA0ADE6C21CBFC9700D34B9D /* org.sparkle-project.InstallerLauncher.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; DA0ADE7121CBFCA700D34B9D /* org.sparkle-project.InstallerStatus.xpc in Embed XPC Services */ = {isa = PBXBuildFile; fileRef = DA0ADE6D21CBFC9700D34B9D /* org.sparkle-project.InstallerStatus.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + DA13771A25E969FF00FB0FAD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DA13771925E969FF00FB0FAD /* Assets.xcassets */; }; DA173B371F65B41B00932CE0 /* KYAStatusItemController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA173B361F65B41B00932CE0 /* KYAStatusItemController.m */; }; + DA19F0BA2610810E001A6AA6 /* KYAKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA19F0B12610810E001A6AA6 /* KYAKit.framework */; }; + DA19F0C12610810E001A6AA6 /* KYAKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA19F0C02610810E001A6AA6 /* KYAKitTests.m */; }; + DA19F0C32610810E001A6AA6 /* KYAKit.h in Headers */ = {isa = PBXBuildFile; fileRef = DA19F0B32610810E001A6AA6 /* KYAKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA19F0C62610810E001A6AA6 /* KYAKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA19F0B12610810E001A6AA6 /* KYAKit.framework */; }; + DA19F0C72610810E001A6AA6 /* KYAKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA19F0B12610810E001A6AA6 /* KYAKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; DA2691D21B8231C700B15779 /* KYAMenuBarIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = DA2691D11B8231C700B15779 /* KYAMenuBarIcon.m */; }; - DA39208122FC12E70058F0C2 /* NSDate+RemainingTime.m in Sources */ = {isa = PBXBuildFile; fileRef = DA39208022FC12E70058F0C2 /* NSDate+RemainingTime.m */; }; - DA46C1EE1BDCDFB00050357C /* NSUserDefaults+Keys.m in Sources */ = {isa = PBXBuildFile; fileRef = DA46C1ED1BDCDFB00050357C /* NSUserDefaults+Keys.m */; }; - DA51E7DE1C2562A2008AA96C /* KYAActivationDuration.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA51E7DD1C2562A2008AA96C /* KYAActivationDuration.mm */; }; + DA3D5C25261386AC00C7E103 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA3D5C27261386AC00C7E103 /* Localizable.strings */; }; + DA3D5C3A2613895800C7E103 /* NSBundle+KYAVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = DA3D5C382613895800C7E103 /* NSBundle+KYAVersion.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA3D5C3B2613895800C7E103 /* NSBundle+KYAVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = DA3D5C392613895800C7E103 /* NSBundle+KYAVersion.m */; }; + DA3D5C5A2613913B00C7E103 /* KYAActivationDuration.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA3D5C582613913A00C7E103 /* KYAActivationDuration.mm */; }; + DA3D5C5B2613913B00C7E103 /* KYAActivationDuration.h in Headers */ = {isa = PBXBuildFile; fileRef = DA3D5C592613913B00C7E103 /* KYAActivationDuration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA3D5C682613917E00C7E103 /* KYAActivationDurationsController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA3D5C662613917E00C7E103 /* KYAActivationDurationsController.m */; }; + DA3D5C692613917E00C7E103 /* KYAActivationDurationsController.h in Headers */ = {isa = PBXBuildFile; fileRef = DA3D5C672613917E00C7E103 /* KYAActivationDurationsController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA44F23F26109ED700E6A516 /* KYABatteryStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = DA44F23D26109ED700E6A516 /* KYABatteryStatus.m */; }; + DA44F24026109ED700E6A516 /* KYABatteryStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = DA44F23E26109ED700E6A516 /* KYABatteryStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA44F25B26109FFA00E6A516 /* KYAEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = DA44F25726109FFA00E6A516 /* KYAEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA44F25C26109FFA00E6A516 /* KYAEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = DA44F25826109FFA00E6A516 /* KYAEventHandler.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA44F25D26109FFA00E6A516 /* KYAEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = DA44F25926109FFA00E6A516 /* KYAEvent.m */; }; + DA44F25E26109FFA00E6A516 /* KYAEventHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = DA44F25A26109FFA00E6A516 /* KYAEventHandler.m */; }; + DA44F2742610A20B00E6A516 /* NSDate+RemainingTime.m in Sources */ = {isa = PBXBuildFile; fileRef = DA44F2722610A20B00E6A516 /* NSDate+RemainingTime.m */; }; + DA44F2752610A20B00E6A516 /* NSDate+RemainingTime.h in Headers */ = {isa = PBXBuildFile; fileRef = DA44F2732610A20B00E6A516 /* NSDate+RemainingTime.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA52B0F3261701A800D09FE5 /* KYAUserNotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = DA52B0EC261701A800D09FE5 /* KYAUserNotificationCenter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA52B0F4261701A800D09FE5 /* NSURL+KYAUserNotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = DA52B0EE261701A800D09FE5 /* NSURL+KYAUserNotificationCenter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA52B0F5261701A800D09FE5 /* NSWorkspace+KYAUserNotificationCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = DA52B0EF261701A800D09FE5 /* NSWorkspace+KYAUserNotificationCenter.m */; }; + DA52B0F6261701A800D09FE5 /* NSURL+KYAUserNotificationCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = DA52B0F0261701A800D09FE5 /* NSURL+KYAUserNotificationCenter.m */; }; + DA52B0F7261701A800D09FE5 /* NSWorkspace+KYAUserNotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = DA52B0F1261701A800D09FE5 /* NSWorkspace+KYAUserNotificationCenter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA52B0F8261701A800D09FE5 /* KYAUserNotificationCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = DA52B0F2261701A800D09FE5 /* KYAUserNotificationCenter.m */; }; + DA52B1082617021500D09FE5 /* KYAActivationUserNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = DA52B1062617021500D09FE5 /* KYAActivationUserNotification.m */; }; DA54C10F1D69C20F00AF9E9D /* Preferences.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DA54C1111D69C20F00AF9E9D /* Preferences.storyboard */; }; DA54C12A1D69C55400AF9E9D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA54C12C1D69C55400AF9E9D /* Localizable.strings */; }; DA54C1311D69CA0000AF9E9D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA54C1331D69CA0000AF9E9D /* InfoPlist.strings */; }; DA56801B2115FF140039C979 /* KYAUpdatePreferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5680192115FF140039C979 /* KYAUpdatePreferencesViewController.m */; }; - DA5A50941ACC5C5400A444C8 /* KYAEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5A50931ACC5C5400A444C8 /* KYAEvent.m */; }; - DA5B5A231C28612100EE45C6 /* KYABatteryStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5B5A221C28612100EE45C6 /* KYABatteryStatus.m */; }; DA637B3F19F14693004C8838 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DA637B3E19F14693004C8838 /* main.m */; }; DA637B4219F14693004C8838 /* KYAAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DA637B4119F14693004C8838 /* KYAAppDelegate.m */; }; - DA637B4419F14693004C8838 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DA637B4319F14693004C8838 /* Images.xcassets */; }; DA637B4719F14693004C8838 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA637B4519F14693004C8838 /* MainMenu.xib */; }; DA637B5E19F146B6004C8838 /* KYAAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA637B5D19F146B6004C8838 /* KYAAppController.m */; }; - DA658E6621CE8C130049F4C1 /* NSApplication+KYALauncher.m in Sources */ = {isa = PBXBuildFile; fileRef = DA658E6521CE8C130049F4C1 /* NSApplication+KYALauncher.m */; }; DA658E7121CE907D0049F4C1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DA658E7021CE907D0049F4C1 /* Assets.xcassets */; }; DA658E7721CE907D0049F4C1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DA658E7621CE907D0049F4C1 /* main.m */; }; DA658E7D21CE90F30049F4C1 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA658E7C21CE90F30049F4C1 /* MainMenu.xib */; }; DA658E8021CE91540049F4C1 /* KYAAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DA658E7F21CE91540049F4C1 /* KYAAppDelegate.m */; }; DA658E8421CE93310049F4C1 /* KeepingYouAwake Launcher.app in Embed Launcher */ = {isa = PBXBuildFile; fileRef = DA658E6B21CE907B0049F4C1 /* KeepingYouAwake Launcher.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - DA73AB8822EDB9FE00D085CE /* KYAActivationDurationsController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA73AB8722EDB9FE00D085CE /* KYAActivationDurationsController.m */; }; DA7B53061E16999A00D89A12 /* KYAPreferencesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA7B53051E16999A00D89A12 /* KYAPreferencesWindowController.m */; }; DA82560D22FB5AFC005ECB3A /* KYAActivationDurationsMenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA82560C22FB5AFC005ECB3A /* KYAActivationDurationsMenuController.m */; }; DA82B1161C2426E400FA46E0 /* KYAGeneralPreferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA82B1151C2426E400FA46E0 /* KYAGeneralPreferencesViewController.m */; }; - DA86A5E222FEB81C00B2D1B4 /* KYALocalizedStrings.m in Sources */ = {isa = PBXBuildFile; fileRef = DA86A5E122FEB81C00B2D1B4 /* KYALocalizedStrings.m */; }; DA987C9C22FC749D00DD476B /* KYAAddDurationPreferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA987C9B22FC749D00DD476B /* KYAAddDurationPreferencesViewController.m */; }; + DA9A4FE6261631D700C672C4 /* KYALocalizedStrings.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9A4FE5261631D700C672C4 /* KYALocalizedStrings.m */; }; + DA9C58922610DE8B005F3A34 /* NSUserDefaults+Keys.h in Headers */ = {isa = PBXBuildFile; fileRef = DA9C58902610DE8B005F3A34 /* NSUserDefaults+Keys.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA9C58932610DE8B005F3A34 /* NSUserDefaults+Keys.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9C58912610DE8B005F3A34 /* NSUserDefaults+Keys.m */; }; + DA9C58A22610E0C1005F3A34 /* NSBundle+KYAUpdateFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9C58A02610E0C1005F3A34 /* NSBundle+KYAUpdateFeed.m */; }; + DA9C58A32610E0C1005F3A34 /* NSBundle+KYAUpdateFeed.h in Headers */ = {isa = PBXBuildFile; fileRef = DA9C58A12610E0C1005F3A34 /* NSBundle+KYAUpdateFeed.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA9C58C226110010005F3A34 /* NSApplication+KYALauncher.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9C58C026110010005F3A34 /* NSApplication+KYALauncher.m */; }; + DA9C58C326110010005F3A34 /* NSApplication+KYALauncher.h in Headers */ = {isa = PBXBuildFile; fileRef = DA9C58C126110010005F3A34 /* NSApplication+KYALauncher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA9C58D02611011D005F3A34 /* KYASleepWakeTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = DA9C58CE2611011D005F3A34 /* KYASleepWakeTimer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA9C58D12611011D005F3A34 /* KYASleepWakeTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9C58CF2611011D005F3A34 /* KYASleepWakeTimer.m */; }; DAB0700A22EC794F004D5BCA /* KYADurationCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DAB0700922EC794F004D5BCA /* KYADurationCell.m */; }; DAB0700C22EC795F004D5BCA /* KYADurationCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DAB0700B22EC795F004D5BCA /* KYADurationCell.xib */; }; DAB0701022EC8E6B004D5BCA /* KYADurationPreferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DAB0700E22EC8E6B004D5BCA /* KYADurationPreferencesViewController.m */; }; DAB128691C2453F600831045 /* KYAAdvancedPreferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DAB128681C2453F600831045 /* KYAAdvancedPreferencesViewController.m */; }; DAB1286C1C24540200831045 /* KYAAboutPreferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DAB1286B1C24540200831045 /* KYAAboutPreferencesViewController.m */; }; - DAB128711C245F1B00831045 /* NSApplication+Versions.m in Sources */ = {isa = PBXBuildFile; fileRef = DAB128701C245F1B00831045 /* NSApplication+Versions.m */; }; DAB128731C2469F300831045 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = DAB1286D1C245A6C00831045 /* Credits.rtf */; }; DAB128761C2493DB00831045 /* KYAPreference.m in Sources */ = {isa = PBXBuildFile; fileRef = DAB128751C2493DB00831045 /* KYAPreference.m */; }; - DAB268721A0D6BC600B58AD6 /* KYASleepWakeTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = DAB268711A0D6BC600B58AD6 /* KYASleepWakeTimer.m */; }; - DAD2725B1ACB266800CDD620 /* KYAEventHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = DAD2725A1ACB266800CDD620 /* KYAEventHandler.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + DA19F0BB2610810E001A6AA6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DA637B3119F14693004C8838 /* Project object */; + proxyType = 1; + remoteGlobalIDString = DA19F0B02610810E001A6AA6; + remoteInfo = KYAKit; + }; + DA19F0BD2610810E001A6AA6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DA637B3119F14693004C8838 /* Project object */; + proxyType = 1; + remoteGlobalIDString = DA637B3819F14693004C8838; + remoteInfo = KeepingYouAwake; + }; + DA19F0C42610810E001A6AA6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DA637B3119F14693004C8838 /* Project object */; + proxyType = 1; + remoteGlobalIDString = DA19F0B02610810E001A6AA6; + remoteInfo = KYAKit; + }; DA87FF5E21D42525009045F3 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = DA637B3119F14693004C8838 /* Project object */; @@ -97,6 +143,7 @@ dstSubfolderSpec = 10; files = ( DA0ADE6821CBFC6000D34B9D /* Sparkle.framework in Embed Frameworks */, + DA19F0C72610810E001A6AA6 /* KYAKit.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -119,25 +166,63 @@ DA0ADE6C21CBFC9700D34B9D /* org.sparkle-project.InstallerLauncher.xpc */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.xpc-service"; name = "org.sparkle-project.InstallerLauncher.xpc"; path = "Vendor/Sparkle/XPCServices/org.sparkle-project.InstallerLauncher.xpc"; sourceTree = ""; }; DA0ADE6D21CBFC9700D34B9D /* org.sparkle-project.InstallerStatus.xpc */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.xpc-service"; name = "org.sparkle-project.InstallerStatus.xpc"; path = "Vendor/Sparkle/XPCServices/org.sparkle-project.InstallerStatus.xpc"; sourceTree = ""; }; DA0CA9FE21D0111600879C8B /* KeepingYouAwake.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = KeepingYouAwake.entitlements; sourceTree = ""; }; + DA13771925E969FF00FB0FAD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; DA173B351F65B41B00932CE0 /* KYAStatusItemController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KYAStatusItemController.h; sourceTree = ""; }; DA173B361F65B41B00932CE0 /* KYAStatusItemController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYAStatusItemController.m; sourceTree = ""; }; + DA19F0B12610810E001A6AA6 /* KYAKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = KYAKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DA19F0B32610810E001A6AA6 /* KYAKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KYAKit.h; sourceTree = ""; }; + DA19F0B42610810E001A6AA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DA19F0B92610810E001A6AA6 /* KYAKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KYAKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + DA19F0C02610810E001A6AA6 /* KYAKitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYAKitTests.m; sourceTree = ""; }; + DA19F0C22610810E001A6AA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DA249E281F9B7211006BCD2C /* KYADefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KYADefines.h; sourceTree = ""; }; DA2691D01B8231C700B15779 /* KYAMenuBarIcon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAMenuBarIcon.h; sourceTree = ""; }; DA2691D11B8231C700B15779 /* KYAMenuBarIcon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAMenuBarIcon.m; sourceTree = ""; }; - DA39207F22FC12E70058F0C2 /* NSDate+RemainingTime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDate+RemainingTime.h"; sourceTree = ""; }; - DA39208022FC12E70058F0C2 /* NSDate+RemainingTime.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSDate+RemainingTime.m"; sourceTree = ""; }; + DA3D5C182613860600C7E103 /* KYAKitLocalizedStrings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAKitLocalizedStrings.h; sourceTree = ""; }; + DA3D5C26261386AC00C7E103 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C2B2613875600C7E103 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C2C2613878000C7E103 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C2D261387B800C7E103 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C2E261387E000C7E103 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C2F2613880600C7E103 /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C302613881D00C7E103 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C312613883700C7E103 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C322613884A00C7E103 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C332613886100C7E103 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C342613887800C7E103 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C352613888D00C7E103 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C36261388A700C7E103 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/Localizable.strings; sourceTree = ""; }; + DA3D5C37261388C200C7E103 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/Localizable.strings"; sourceTree = ""; }; + DA3D5C382613895800C7E103 /* NSBundle+KYAVersion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSBundle+KYAVersion.h"; sourceTree = ""; }; + DA3D5C392613895800C7E103 /* NSBundle+KYAVersion.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+KYAVersion.m"; sourceTree = ""; }; + DA3D5C582613913A00C7E103 /* KYAActivationDuration.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KYAActivationDuration.mm; sourceTree = ""; }; + DA3D5C592613913B00C7E103 /* KYAActivationDuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAActivationDuration.h; sourceTree = ""; }; + DA3D5C662613917E00C7E103 /* KYAActivationDurationsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAActivationDurationsController.m; sourceTree = ""; }; + DA3D5C672613917E00C7E103 /* KYAActivationDurationsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAActivationDurationsController.h; sourceTree = ""; }; DA4121711F5C07130083B6E6 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/Preferences.strings; sourceTree = ""; }; DA4121721F5C07140083B6E6 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/Localizable.strings; sourceTree = ""; }; DA4121731F5C07140083B6E6 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/InfoPlist.strings; sourceTree = ""; }; DA4121741F5C07140083B6E6 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/MainMenu.strings; sourceTree = ""; }; - DA46C1EC1BDCDFB00050357C /* NSUserDefaults+Keys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSUserDefaults+Keys.h"; sourceTree = ""; }; - DA46C1ED1BDCDFB00050357C /* NSUserDefaults+Keys.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSUserDefaults+Keys.m"; sourceTree = ""; }; + DA44F23D26109ED700E6A516 /* KYABatteryStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYABatteryStatus.m; sourceTree = ""; }; + DA44F23E26109ED700E6A516 /* KYABatteryStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYABatteryStatus.h; sourceTree = ""; }; + DA44F25726109FFA00E6A516 /* KYAEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAEvent.h; sourceTree = ""; }; + DA44F25826109FFA00E6A516 /* KYAEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAEventHandler.h; sourceTree = ""; }; + DA44F25926109FFA00E6A516 /* KYAEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAEvent.m; sourceTree = ""; }; + DA44F25A26109FFA00E6A516 /* KYAEventHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAEventHandler.m; sourceTree = ""; }; + DA44F2722610A20B00E6A516 /* NSDate+RemainingTime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+RemainingTime.m"; sourceTree = ""; }; + DA44F2732610A20B00E6A516 /* NSDate+RemainingTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+RemainingTime.h"; sourceTree = ""; }; DA51141C1E214E1600635931 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Preferences.strings; sourceTree = ""; }; DA51141D1E214E1600635931 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = ""; }; DA51141E1E214E1600635931 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = ""; }; DA51141F1E214E1600635931 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/MainMenu.strings; sourceTree = ""; }; - DA51E7DC1C2562A2008AA96C /* KYAActivationDuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAActivationDuration.h; sourceTree = ""; }; - DA51E7DD1C2562A2008AA96C /* KYAActivationDuration.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KYAActivationDuration.mm; sourceTree = ""; }; + DA52B0EC261701A800D09FE5 /* KYAUserNotificationCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAUserNotificationCenter.h; sourceTree = ""; }; + DA52B0EE261701A800D09FE5 /* NSURL+KYAUserNotificationCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+KYAUserNotificationCenter.h"; sourceTree = ""; }; + DA52B0EF261701A800D09FE5 /* NSWorkspace+KYAUserNotificationCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSWorkspace+KYAUserNotificationCenter.m"; sourceTree = ""; }; + DA52B0F0261701A800D09FE5 /* NSURL+KYAUserNotificationCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURL+KYAUserNotificationCenter.m"; sourceTree = ""; }; + DA52B0F1261701A800D09FE5 /* NSWorkspace+KYAUserNotificationCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSWorkspace+KYAUserNotificationCenter.h"; sourceTree = ""; }; + DA52B0F2261701A800D09FE5 /* KYAUserNotificationCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAUserNotificationCenter.m; sourceTree = ""; }; + DA52B1062617021500D09FE5 /* KYAActivationUserNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAActivationUserNotification.m; sourceTree = ""; }; + DA52B1072617021500D09FE5 /* KYAActivationUserNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAActivationUserNotification.h; sourceTree = ""; }; DA54C1101D69C20F00AF9E9D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Preferences.storyboard; sourceTree = ""; }; DA54C1221D69C55300AF9E9D /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Preferences.strings; sourceTree = ""; }; DA54C12B1D69C55400AF9E9D /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; @@ -147,16 +232,11 @@ DA54C1341D69CA0700AF9E9D /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/InfoPlist.strings; sourceTree = ""; }; DA5680192115FF140039C979 /* KYAUpdatePreferencesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAUpdatePreferencesViewController.m; sourceTree = ""; }; DA56801A2115FF140039C979 /* KYAUpdatePreferencesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAUpdatePreferencesViewController.h; sourceTree = ""; }; - DA5A50921ACC5C5400A444C8 /* KYAEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAEvent.h; sourceTree = ""; }; - DA5A50931ACC5C5400A444C8 /* KYAEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAEvent.m; sourceTree = ""; }; - DA5B5A211C28612100EE45C6 /* KYABatteryStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYABatteryStatus.h; sourceTree = ""; }; - DA5B5A221C28612100EE45C6 /* KYABatteryStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYABatteryStatus.m; sourceTree = ""; }; DA637B3919F14693004C8838 /* KeepingYouAwake.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KeepingYouAwake.app; sourceTree = BUILT_PRODUCTS_DIR; }; DA637B3D19F14693004C8838 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DA637B3E19F14693004C8838 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; DA637B4019F14693004C8838 /* KYAAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KYAAppDelegate.h; sourceTree = ""; }; DA637B4119F14693004C8838 /* KYAAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYAAppDelegate.m; sourceTree = ""; }; - DA637B4319F14693004C8838 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; DA637B4619F14693004C8838 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; DA637B5C19F146B6004C8838 /* KYAAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAAppController.h; sourceTree = ""; }; DA637B5D19F146B6004C8838 /* KYAAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAAppController.m; sourceTree = ""; }; @@ -164,8 +244,6 @@ DA6439CB1E20F29E0078ECE4 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; DA6439CC1E20F29E0078ECE4 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; DA6439CD1E20F29E0078ECE4 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/MainMenu.strings; sourceTree = ""; }; - DA658E6421CE8C130049F4C1 /* NSApplication+KYALauncher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSApplication+KYALauncher.h"; sourceTree = ""; }; - DA658E6521CE8C130049F4C1 /* NSApplication+KYALauncher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSApplication+KYALauncher.m"; sourceTree = ""; }; DA658E6B21CE907B0049F4C1 /* KeepingYouAwake Launcher.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "KeepingYouAwake Launcher.app"; sourceTree = BUILT_PRODUCTS_DIR; }; DA658E7021CE907D0049F4C1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; DA658E7521CE907D0049F4C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -182,23 +260,28 @@ DA66277420CC0689007834DB /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = ""; }; DA66277520CC0693007834DB /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; DA66277620CC0695007834DB /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - DA73AB8622EDB9FE00D085CE /* KYAActivationDurationsController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KYAActivationDurationsController.h; sourceTree = ""; }; - DA73AB8722EDB9FE00D085CE /* KYAActivationDurationsController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYAActivationDurationsController.m; sourceTree = ""; }; DA753D391C3714A800955BE3 /* KYABatteryCapacityThreshold.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KYABatteryCapacityThreshold.h; sourceTree = ""; }; DA7B53041E16999A00D89A12 /* KYAPreferencesWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAPreferencesWindowController.h; sourceTree = ""; }; DA7B53051E16999A00D89A12 /* KYAPreferencesWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAPreferencesWindowController.m; sourceTree = ""; }; - DA7C2E161E2159D200B84F59 /* Configuration.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Configuration.xcconfig; sourceTree = SOURCE_ROOT; }; DA82560B22FB5AFC005ECB3A /* KYAActivationDurationsMenuController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KYAActivationDurationsMenuController.h; sourceTree = ""; }; DA82560C22FB5AFC005ECB3A /* KYAActivationDurationsMenuController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYAActivationDurationsMenuController.m; sourceTree = ""; }; DA82B1141C2426E400FA46E0 /* KYAGeneralPreferencesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAGeneralPreferencesViewController.h; sourceTree = ""; }; DA82B1151C2426E400FA46E0 /* KYAGeneralPreferencesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAGeneralPreferencesViewController.m; sourceTree = ""; }; - DA86A5E122FEB81C00B2D1B4 /* KYALocalizedStrings.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYALocalizedStrings.m; sourceTree = ""; }; DA8B21961F6057A200BF5013 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/Preferences.strings"; sourceTree = ""; }; DA8B21971F6057A200BF5013 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/MainMenu.strings"; sourceTree = ""; }; DA8B21981F6057A200BF5013 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/InfoPlist.strings"; sourceTree = ""; }; DA8B21991F6057A200BF5013 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/Localizable.strings"; sourceTree = ""; }; DA987C9A22FC749D00DD476B /* KYAAddDurationPreferencesViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KYAAddDurationPreferencesViewController.h; sourceTree = ""; }; DA987C9B22FC749D00DD476B /* KYAAddDurationPreferencesViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYAAddDurationPreferencesViewController.m; sourceTree = ""; }; + DA9A4FE5261631D700C672C4 /* KYALocalizedStrings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYALocalizedStrings.m; sourceTree = ""; }; + DA9C58902610DE8B005F3A34 /* NSUserDefaults+Keys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSUserDefaults+Keys.h"; sourceTree = ""; }; + DA9C58912610DE8B005F3A34 /* NSUserDefaults+Keys.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSUserDefaults+Keys.m"; sourceTree = ""; }; + DA9C58A02610E0C1005F3A34 /* NSBundle+KYAUpdateFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+KYAUpdateFeed.m"; sourceTree = ""; }; + DA9C58A12610E0C1005F3A34 /* NSBundle+KYAUpdateFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+KYAUpdateFeed.h"; sourceTree = ""; }; + DA9C58C026110010005F3A34 /* NSApplication+KYALauncher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSApplication+KYALauncher.m"; sourceTree = ""; }; + DA9C58C126110010005F3A34 /* NSApplication+KYALauncher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSApplication+KYALauncher.h"; sourceTree = ""; }; + DA9C58CE2611011D005F3A34 /* KYASleepWakeTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYASleepWakeTimer.h; sourceTree = ""; }; + DA9C58CF2611011D005F3A34 /* KYASleepWakeTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYASleepWakeTimer.m; sourceTree = ""; }; DAA478D3227C233000E609C1 /* KYALocalizedStrings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KYALocalizedStrings.h; sourceTree = ""; }; DAAAAAA023B14D04004A44EF /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/Localizable.strings; sourceTree = ""; }; DAAAAAA123B14D04004A44EF /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/Preferences.strings; sourceTree = ""; }; @@ -213,18 +296,13 @@ DAB1286A1C24540200831045 /* KYAAboutPreferencesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAAboutPreferencesViewController.h; sourceTree = ""; }; DAB1286B1C24540200831045 /* KYAAboutPreferencesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAAboutPreferencesViewController.m; sourceTree = ""; }; DAB1286D1C245A6C00831045 /* Credits.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = SOURCE_ROOT; }; - DAB1286F1C245F1B00831045 /* NSApplication+Versions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSApplication+Versions.h"; sourceTree = ""; }; - DAB128701C245F1B00831045 /* NSApplication+Versions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSApplication+Versions.m"; sourceTree = ""; }; DAB128741C2493DB00831045 /* KYAPreference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAPreference.h; sourceTree = ""; }; DAB128751C2493DB00831045 /* KYAPreference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAPreference.m; sourceTree = ""; }; - DAB268701A0D6BC600B58AD6 /* KYASleepWakeTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYASleepWakeTimer.h; sourceTree = ""; }; - DAB268711A0D6BC600B58AD6 /* KYASleepWakeTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYASleepWakeTimer.m; sourceTree = ""; }; - DAD272591ACB266800CDD620 /* KYAEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYAEventHandler.h; sourceTree = ""; }; - DAD2725A1ACB266800CDD620 /* KYAEventHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYAEventHandler.m; sourceTree = ""; }; DAD3B5761EC6FA5A0022E5D0 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Preferences.strings; sourceTree = ""; }; DAD3B5771EC6FA5A0022E5D0 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Localizable.strings; sourceTree = ""; }; DAD3B5781EC6FA5A0022E5D0 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/InfoPlist.strings; sourceTree = ""; }; DAD3B5791EC6FA5A0022E5D0 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/MainMenu.strings; sourceTree = ""; }; + DAE9C00D26107E1A00F9ED76 /* Configuration.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Configuration.xcconfig; sourceTree = SOURCE_ROOT; }; DAF3080A2503828D00614AAF /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Preferences.strings; sourceTree = ""; }; DAF3080B2503828D00614AAF /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/MainMenu.strings; sourceTree = ""; }; DAF3080C2503828D00614AAF /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -236,11 +314,27 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + DA19F0AE2610810E001A6AA6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DA19F0B62610810E001A6AA6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DA19F0BA2610810E001A6AA6 /* KYAKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; DA637B3619F14693004C8838 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( DA0ADE6621CBFC5800D34B9D /* Sparkle.framework in Frameworks */, + DA19F0C62610810E001A6AA6 /* KYAKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -254,37 +348,93 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - DA2691CF1B8230AB00B15779 /* MenuBar Icon */ = { + DA19F0B22610810E001A6AA6 /* KYAKit */ = { + isa = PBXGroup; + children = ( + DA19F0B32610810E001A6AA6 /* KYAKit.h */, + DA3D5C182613860600C7E103 /* KYAKitLocalizedStrings.h */, + DA3D5C27261386AC00C7E103 /* Localizable.strings */, + DA3D5C572613912800C7E103 /* KYAActivationDuration */, + DA3D5C652613917E00C7E103 /* KYAActivationDurationsController */, + DA44F23C26109ED700E6A516 /* KYABatteryStatus */, + DA44F25626109FFA00E6A516 /* KYAEventHandler */, + DA9C58CD2611011D005F3A34 /* KYASleepWakeTimer */, + DA52B0EB261701A800D09FE5 /* KYAUserNotificationCenter */, + DA44F2712610A1F900E6A516 /* Extensions */, + DA19F0B42610810E001A6AA6 /* Info.plist */, + ); + path = KYAKit; + sourceTree = ""; + }; + DA19F0BF2610810E001A6AA6 /* KYAKitTests */ = { + isa = PBXGroup; + children = ( + DA19F0C02610810E001A6AA6 /* KYAKitTests.m */, + DA19F0C22610810E001A6AA6 /* Info.plist */, + ); + path = KYAKitTests; + sourceTree = ""; + }; + DA2691CF1B8230AB00B15779 /* KYAMenuBarIcon */ = { isa = PBXGroup; children = ( DA2691D01B8231C700B15779 /* KYAMenuBarIcon.h */, DA2691D11B8231C700B15779 /* KYAMenuBarIcon.m */, ); - path = "MenuBar Icon"; + path = KYAMenuBarIcon; + sourceTree = ""; + }; + DA3D5C572613912800C7E103 /* KYAActivationDuration */ = { + isa = PBXGroup; + children = ( + DA3D5C592613913B00C7E103 /* KYAActivationDuration.h */, + DA3D5C582613913A00C7E103 /* KYAActivationDuration.mm */, + ); + path = KYAActivationDuration; + sourceTree = ""; + }; + DA3D5C652613917E00C7E103 /* KYAActivationDurationsController */ = { + isa = PBXGroup; + children = ( + DA3D5C672613917E00C7E103 /* KYAActivationDurationsController.h */, + DA3D5C662613917E00C7E103 /* KYAActivationDurationsController.m */, + ); + path = KYAActivationDurationsController; + sourceTree = ""; + }; + DA44F23C26109ED700E6A516 /* KYABatteryStatus */ = { + isa = PBXGroup; + children = ( + DA44F23E26109ED700E6A516 /* KYABatteryStatus.h */, + DA44F23D26109ED700E6A516 /* KYABatteryStatus.m */, + ); + path = KYABatteryStatus; sourceTree = ""; }; - DA4919C51ACFFF8D00D44F6A /* Event Handler */ = { + DA44F25626109FFA00E6A516 /* KYAEventHandler */ = { isa = PBXGroup; children = ( - DAD272591ACB266800CDD620 /* KYAEventHandler.h */, - DAD2725A1ACB266800CDD620 /* KYAEventHandler.m */, - DA5A50921ACC5C5400A444C8 /* KYAEvent.h */, - DA5A50931ACC5C5400A444C8 /* KYAEvent.m */, + DA44F25726109FFA00E6A516 /* KYAEvent.h */, + DA44F25926109FFA00E6A516 /* KYAEvent.m */, + DA44F25826109FFA00E6A516 /* KYAEventHandler.h */, + DA44F25A26109FFA00E6A516 /* KYAEventHandler.m */, ); - path = "Event Handler"; + path = KYAEventHandler; sourceTree = ""; }; - DA4919C61ACFFF9600D44F6A /* Extensions */ = { + DA44F2712610A1F900E6A516 /* Extensions */ = { isa = PBXGroup; children = ( - DA658E6421CE8C130049F4C1 /* NSApplication+KYALauncher.h */, - DA658E6521CE8C130049F4C1 /* NSApplication+KYALauncher.m */, - DAB1286F1C245F1B00831045 /* NSApplication+Versions.h */, - DAB128701C245F1B00831045 /* NSApplication+Versions.m */, - DA46C1EC1BDCDFB00050357C /* NSUserDefaults+Keys.h */, - DA46C1ED1BDCDFB00050357C /* NSUserDefaults+Keys.m */, - DA39207F22FC12E70058F0C2 /* NSDate+RemainingTime.h */, - DA39208022FC12E70058F0C2 /* NSDate+RemainingTime.m */, + DA9C58C126110010005F3A34 /* NSApplication+KYALauncher.h */, + DA9C58C026110010005F3A34 /* NSApplication+KYALauncher.m */, + DA9C58A12610E0C1005F3A34 /* NSBundle+KYAUpdateFeed.h */, + DA9C58A02610E0C1005F3A34 /* NSBundle+KYAUpdateFeed.m */, + DA3D5C382613895800C7E103 /* NSBundle+KYAVersion.h */, + DA3D5C392613895800C7E103 /* NSBundle+KYAVersion.m */, + DA44F2732610A20B00E6A516 /* NSDate+RemainingTime.h */, + DA44F2722610A20B00E6A516 /* NSDate+RemainingTime.m */, + DA9C58902610DE8B005F3A34 /* NSUserDefaults+Keys.h */, + DA9C58912610DE8B005F3A34 /* NSUserDefaults+Keys.m */, ); path = Extensions; sourceTree = ""; @@ -320,39 +470,52 @@ path = About; sourceTree = ""; }; - DA5680182115FF140039C979 /* Updates */ = { + DA52B0EB261701A800D09FE5 /* KYAUserNotificationCenter */ = { isa = PBXGroup; children = ( - DA56801A2115FF140039C979 /* KYAUpdatePreferencesViewController.h */, - DA5680192115FF140039C979 /* KYAUpdatePreferencesViewController.m */, + DA52B0EC261701A800D09FE5 /* KYAUserNotificationCenter.h */, + DA52B0F2261701A800D09FE5 /* KYAUserNotificationCenter.m */, + DA52B0ED261701A800D09FE5 /* Extensions */, ); - path = Updates; + path = KYAUserNotificationCenter; sourceTree = ""; }; - DA5B5A241C28612800EE45C6 /* Battery Status */ = { + DA52B0ED261701A800D09FE5 /* Extensions */ = { isa = PBXGroup; children = ( - DA5B5A211C28612100EE45C6 /* KYABatteryStatus.h */, - DA5B5A221C28612100EE45C6 /* KYABatteryStatus.m */, + DA52B0EE261701A800D09FE5 /* NSURL+KYAUserNotificationCenter.h */, + DA52B0F0261701A800D09FE5 /* NSURL+KYAUserNotificationCenter.m */, + DA52B0F1261701A800D09FE5 /* NSWorkspace+KYAUserNotificationCenter.h */, + DA52B0EF261701A800D09FE5 /* NSWorkspace+KYAUserNotificationCenter.m */, ); - path = "Battery Status"; + path = Extensions; sourceTree = ""; }; - DA5C10A422FDD27C00554D6B /* KYASleepWakeTimer */ = { + DA52B1052617021500D09FE5 /* KYAActivationUserNotification */ = { isa = PBXGroup; children = ( - DAB268701A0D6BC600B58AD6 /* KYASleepWakeTimer.h */, - DAB268711A0D6BC600B58AD6 /* KYASleepWakeTimer.m */, + DA52B1072617021500D09FE5 /* KYAActivationUserNotification.h */, + DA52B1062617021500D09FE5 /* KYAActivationUserNotification.m */, ); - path = KYASleepWakeTimer; + path = KYAActivationUserNotification; + sourceTree = ""; + }; + DA5680182115FF140039C979 /* Updates */ = { + isa = PBXGroup; + children = ( + DA56801A2115FF140039C979 /* KYAUpdatePreferencesViewController.h */, + DA5680192115FF140039C979 /* KYAUpdatePreferencesViewController.m */, + ); + path = Updates; sourceTree = ""; }; DA637B3019F14693004C8838 = { isa = PBXGroup; children = ( DA637B3B19F14693004C8838 /* KeepingYouAwake */, - DA637B3C19F14693004C8838 /* Supporting Files */, DA658E6C21CE907B0049F4C1 /* KYALauncher */, + DA19F0B22610810E001A6AA6 /* KYAKit */, + DA19F0BF2610810E001A6AA6 /* KYAKitTests */, DA66CF9F1A12A7D700336CDC /* Frameworks */, DA637B3A19F14693004C8838 /* Products */, ); @@ -363,6 +526,8 @@ children = ( DA637B3919F14693004C8838 /* KeepingYouAwake.app */, DA658E6B21CE907B0049F4C1 /* KeepingYouAwake Launcher.app */, + DA19F0B12610810E001A6AA6 /* KYAKit.framework */, + DA19F0B92610810E001A6AA6 /* KYAKitTests.xctest */, ); name = Products; sourceTree = ""; @@ -372,37 +537,17 @@ children = ( DA249E281F9B7211006BCD2C /* KYADefines.h */, DAA478D3227C233000E609C1 /* KYALocalizedStrings.h */, - DA86A5E122FEB81C00B2D1B4 /* KYALocalizedStrings.m */, - DA637B4019F14693004C8838 /* KYAAppDelegate.h */, - DA637B4119F14693004C8838 /* KYAAppDelegate.m */, - DA637B5C19F146B6004C8838 /* KYAAppController.h */, - DA637B5D19F146B6004C8838 /* KYAAppController.m */, - DA5C10A422FDD27C00554D6B /* KYASleepWakeTimer */, - DA73AB8522EDB9CD00D085CE /* KYAActivationDurationsController */, + DA9A4FE5261631D700C672C4 /* KYALocalizedStrings.m */, + DA637B4519F14693004C8838 /* MainMenu.xib */, + DA13771925E969FF00FB0FAD /* Assets.xcassets */, + DAD6480B24F14570008E9AA0 /* KYAAppController */, DA82560E22FB5B31005ECB3A /* KYAActivationDurationsMenuController */, + DA52B1052617021500D09FE5 /* KYAActivationUserNotification */, + DA8F381B1F9BA4360086A84A /* KYAStatusItemController */, + DA2691CF1B8230AB00B15779 /* KYAMenuBarIcon */, DA82B1111C2422F600FA46E0 /* Preferences */, - DA8F381B1F9BA4360086A84A /* StatusItemController */, - DA2691CF1B8230AB00B15779 /* MenuBar Icon */, - DA5B5A241C28612800EE45C6 /* Battery Status */, - DA4919C51ACFFF8D00D44F6A /* Event Handler */, - DA4919C61ACFFF9600D44F6A /* Extensions */, - DAC322C91C65199300DF8B63 /* Resources */, - ); - path = KeepingYouAwake; - sourceTree = ""; - }; - DA637B3C19F14693004C8838 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - DA54C1331D69CA0000AF9E9D /* InfoPlist.strings */, - DA54C12C1D69C55400AF9E9D /* Localizable.strings */, - DA0CA9FE21D0111600879C8B /* KeepingYouAwake.entitlements */, - DA085D0F21D6BAB6003D9B1B /* container-migration.plist */, - DA637B3D19F14693004C8838 /* Info.plist */, - DA637B3E19F14693004C8838 /* main.m */, - DA7C2E161E2159D200B84F59 /* Configuration.xcconfig */, + DAE9C00C26107E0900F9ED76 /* Other… */, ); - name = "Supporting Files"; path = KeepingYouAwake; sourceTree = ""; }; @@ -432,17 +577,6 @@ name = Frameworks; sourceTree = ""; }; - DA73AB8522EDB9CD00D085CE /* KYAActivationDurationsController */ = { - isa = PBXGroup; - children = ( - DA51E7DC1C2562A2008AA96C /* KYAActivationDuration.h */, - DA51E7DD1C2562A2008AA96C /* KYAActivationDuration.mm */, - DA73AB8622EDB9FE00D085CE /* KYAActivationDurationsController.h */, - DA73AB8722EDB9FE00D085CE /* KYAActivationDurationsController.m */, - ); - path = KYAActivationDurationsController; - sourceTree = ""; - }; DA82560E22FB5B31005ECB3A /* KYAActivationDurationsMenuController */ = { isa = PBXGroup; children = ( @@ -467,13 +601,22 @@ path = Preferences; sourceTree = ""; }; - DA8F381B1F9BA4360086A84A /* StatusItemController */ = { + DA8F381B1F9BA4360086A84A /* KYAStatusItemController */ = { isa = PBXGroup; children = ( DA173B351F65B41B00932CE0 /* KYAStatusItemController.h */, DA173B361F65B41B00932CE0 /* KYAStatusItemController.m */, ); - path = StatusItemController; + path = KYAStatusItemController; + sourceTree = ""; + }; + DA9C58CD2611011D005F3A34 /* KYASleepWakeTimer */ = { + isa = PBXGroup; + children = ( + DA9C58CE2611011D005F3A34 /* KYASleepWakeTimer.h */, + DA9C58CF2611011D005F3A34 /* KYASleepWakeTimer.m */, + ); + path = KYASleepWakeTimer; sourceTree = ""; }; DAB0701222EC8E74004D5BCA /* ActivationDuration */ = { @@ -498,18 +641,96 @@ path = KYADurationCell; sourceTree = ""; }; - DAC322C91C65199300DF8B63 /* Resources */ = { + DAD6480B24F14570008E9AA0 /* KYAAppController */ = { isa = PBXGroup; children = ( - DA637B4519F14693004C8838 /* MainMenu.xib */, - DA637B4319F14693004C8838 /* Images.xcassets */, + DA637B4019F14693004C8838 /* KYAAppDelegate.h */, + DA637B4119F14693004C8838 /* KYAAppDelegate.m */, + DA637B5C19F146B6004C8838 /* KYAAppController.h */, + DA637B5D19F146B6004C8838 /* KYAAppController.m */, + ); + path = KYAAppController; + sourceTree = ""; + }; + DAE9C00C26107E0900F9ED76 /* Other… */ = { + isa = PBXGroup; + children = ( + DAE9C00D26107E1A00F9ED76 /* Configuration.xcconfig */, + DA085D0F21D6BAB6003D9B1B /* container-migration.plist */, + DA637B3D19F14693004C8838 /* Info.plist */, + DA54C1331D69CA0000AF9E9D /* InfoPlist.strings */, + DA0CA9FE21D0111600879C8B /* KeepingYouAwake.entitlements */, + DA54C12C1D69C55400AF9E9D /* Localizable.strings */, + DA637B3E19F14693004C8838 /* main.m */, ); - name = Resources; + name = "Other…"; sourceTree = ""; }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + DA19F0AC2610810E001A6AA6 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DA3D5C692613917E00C7E103 /* KYAActivationDurationsController.h in Headers */, + DA9C58C326110010005F3A34 /* NSApplication+KYALauncher.h in Headers */, + DA44F2752610A20B00E6A516 /* NSDate+RemainingTime.h in Headers */, + DA3D5C3A2613895800C7E103 /* NSBundle+KYAVersion.h in Headers */, + DA9C58A32610E0C1005F3A34 /* NSBundle+KYAUpdateFeed.h in Headers */, + DA3D5C5B2613913B00C7E103 /* KYAActivationDuration.h in Headers */, + DA52B0F4261701A800D09FE5 /* NSURL+KYAUserNotificationCenter.h in Headers */, + DA44F25C26109FFA00E6A516 /* KYAEventHandler.h in Headers */, + DA44F24026109ED700E6A516 /* KYABatteryStatus.h in Headers */, + DA9C58D02611011D005F3A34 /* KYASleepWakeTimer.h in Headers */, + DA52B0F7261701A800D09FE5 /* NSWorkspace+KYAUserNotificationCenter.h in Headers */, + DA52B0F3261701A800D09FE5 /* KYAUserNotificationCenter.h in Headers */, + DA44F25B26109FFA00E6A516 /* KYAEvent.h in Headers */, + DA9C58922610DE8B005F3A34 /* NSUserDefaults+Keys.h in Headers */, + DA19F0C32610810E001A6AA6 /* KYAKit.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ + DA19F0B02610810E001A6AA6 /* KYAKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = DA19F0CC2610810E001A6AA6 /* Build configuration list for PBXNativeTarget "KYAKit" */; + buildPhases = ( + DA19F0AC2610810E001A6AA6 /* Headers */, + DA19F0AD2610810E001A6AA6 /* Sources */, + DA19F0AE2610810E001A6AA6 /* Frameworks */, + DA19F0AF2610810E001A6AA6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = KYAKit; + productName = KYAKit; + productReference = DA19F0B12610810E001A6AA6 /* KYAKit.framework */; + productType = "com.apple.product-type.framework"; + }; + DA19F0B82610810E001A6AA6 /* KYAKitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = DA19F0CD2610810E001A6AA6 /* Build configuration list for PBXNativeTarget "KYAKitTests" */; + buildPhases = ( + DA19F0B52610810E001A6AA6 /* Sources */, + DA19F0B62610810E001A6AA6 /* Frameworks */, + DA19F0B72610810E001A6AA6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + DA19F0BC2610810E001A6AA6 /* PBXTargetDependency */, + DA19F0BE2610810E001A6AA6 /* PBXTargetDependency */, + ); + name = KYAKitTests; + productName = KYAKitTests; + productReference = DA19F0B92610810E001A6AA6 /* KYAKitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; DA637B3819F14693004C8838 /* KeepingYouAwake */ = { isa = PBXNativeTarget; buildConfigurationList = DA637B5619F14694004C8838 /* Build configuration list for PBXNativeTarget "KeepingYouAwake" */; @@ -525,6 +746,7 @@ ); dependencies = ( DA87FF5F21D42525009045F3 /* PBXTargetDependency */, + DA19F0C52610810E001A6AA6 /* PBXTargetDependency */, ); name = KeepingYouAwake; productName = KeepingYouAwake; @@ -556,9 +778,20 @@ attributes = { CLASSPREFIX = KYA; DefaultBuildSystemTypeForWorkspace = Latest; - LastUpgradeCheck = 1220; + LastUpgradeCheck = 1240; ORGANIZATIONNAME = "Marcel Dierkes"; TargetAttributes = { + DA19F0B02610810E001A6AA6 = { + CreatedOnToolsVersion = 12.4; + DevelopmentTeam = 5KESHV9W85; + ProvisioningStyle = Automatic; + }; + DA19F0B82610810E001A6AA6 = { + CreatedOnToolsVersion = 12.4; + DevelopmentTeam = 5KESHV9W85; + ProvisioningStyle = Automatic; + TestTargetID = DA637B3819F14693004C8838; + }; DA637B3819F14693004C8838 = { CreatedOnToolsVersion = 6.0.1; DevelopmentTeam = 5KESHV9W85; @@ -612,22 +845,39 @@ targets = ( DA637B3819F14693004C8838 /* KeepingYouAwake */, DA658E6A21CE907B0049F4C1 /* KeepingYouAwake Launcher */, + DA19F0B02610810E001A6AA6 /* KYAKit */, + DA19F0B82610810E001A6AA6 /* KYAKitTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + DA19F0AF2610810E001A6AA6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DA3D5C25261386AC00C7E103 /* Localizable.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DA19F0B72610810E001A6AA6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; DA637B3719F14693004C8838 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - DA637B4419F14693004C8838 /* Images.xcassets in Resources */, DA54C1311D69CA0000AF9E9D /* InfoPlist.strings in Resources */, DA54C12A1D69C55400AF9E9D /* Localizable.strings in Resources */, DAB128731C2469F300831045 /* Credits.rtf in Resources */, DA637B4719F14693004C8838 /* MainMenu.xib in Resources */, DA54C10F1D69C20F00AF9E9D /* Preferences.storyboard in Resources */, DA085D1021D6BAB6003D9B1B /* container-migration.plist in Resources */, + DA13771A25E969FF00FB0FAD /* Assets.xcassets in Resources */, DAB0700C22EC795F004D5BCA /* KYADurationCell.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -644,36 +894,56 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + DA19F0AD2610810E001A6AA6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DA9C58C226110010005F3A34 /* NSApplication+KYALauncher.m in Sources */, + DA52B0F5261701A800D09FE5 /* NSWorkspace+KYAUserNotificationCenter.m in Sources */, + DA44F2742610A20B00E6A516 /* NSDate+RemainingTime.m in Sources */, + DA44F25D26109FFA00E6A516 /* KYAEvent.m in Sources */, + DA9C58932610DE8B005F3A34 /* NSUserDefaults+Keys.m in Sources */, + DA52B0F6261701A800D09FE5 /* NSURL+KYAUserNotificationCenter.m in Sources */, + DA44F23F26109ED700E6A516 /* KYABatteryStatus.m in Sources */, + DA3D5C3B2613895800C7E103 /* NSBundle+KYAVersion.m in Sources */, + DA52B0F8261701A800D09FE5 /* KYAUserNotificationCenter.m in Sources */, + DA3D5C682613917E00C7E103 /* KYAActivationDurationsController.m in Sources */, + DA9C58D12611011D005F3A34 /* KYASleepWakeTimer.m in Sources */, + DA44F25E26109FFA00E6A516 /* KYAEventHandler.m in Sources */, + DA9C58A22610E0C1005F3A34 /* NSBundle+KYAUpdateFeed.m in Sources */, + DA3D5C5A2613913B00C7E103 /* KYAActivationDuration.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DA19F0B52610810E001A6AA6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DA19F0C12610810E001A6AA6 /* KYAKitTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; DA637B3519F14693004C8838 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( DA987C9C22FC749D00DD476B /* KYAAddDurationPreferencesViewController.m in Sources */, DA56801B2115FF140039C979 /* KYAUpdatePreferencesViewController.m in Sources */, - DA5B5A231C28612100EE45C6 /* KYABatteryStatus.m in Sources */, DA7B53061E16999A00D89A12 /* KYAPreferencesWindowController.m in Sources */, - DA46C1EE1BDCDFB00050357C /* NSUserDefaults+Keys.m in Sources */, DA637B4219F14693004C8838 /* KYAAppDelegate.m in Sources */, DAB0701022EC8E6B004D5BCA /* KYADurationPreferencesViewController.m in Sources */, DA82560D22FB5AFC005ECB3A /* KYAActivationDurationsMenuController.m in Sources */, - DA5A50941ACC5C5400A444C8 /* KYAEvent.m in Sources */, + DA52B1082617021500D09FE5 /* KYAActivationUserNotification.m in Sources */, + DA9A4FE6261631D700C672C4 /* KYALocalizedStrings.m in Sources */, DA82B1161C2426E400FA46E0 /* KYAGeneralPreferencesViewController.m in Sources */, DAB0700A22EC794F004D5BCA /* KYADurationCell.m in Sources */, DA2691D21B8231C700B15779 /* KYAMenuBarIcon.m in Sources */, DAB128761C2493DB00831045 /* KYAPreference.m in Sources */, - DA39208122FC12E70058F0C2 /* NSDate+RemainingTime.m in Sources */, - DA86A5E222FEB81C00B2D1B4 /* KYALocalizedStrings.m in Sources */, - DAB128711C245F1B00831045 /* NSApplication+Versions.m in Sources */, DAB128691C2453F600831045 /* KYAAdvancedPreferencesViewController.m in Sources */, DAB1286C1C24540200831045 /* KYAAboutPreferencesViewController.m in Sources */, - DA51E7DE1C2562A2008AA96C /* KYAActivationDuration.mm in Sources */, DA637B5E19F146B6004C8838 /* KYAAppController.m in Sources */, - DAB268721A0D6BC600B58AD6 /* KYASleepWakeTimer.m in Sources */, - DA73AB8822EDB9FE00D085CE /* KYAActivationDurationsController.m in Sources */, DA637B3F19F14693004C8838 /* main.m in Sources */, - DA658E6621CE8C130049F4C1 /* NSApplication+KYALauncher.m in Sources */, DA173B371F65B41B00932CE0 /* KYAStatusItemController.m in Sources */, - DAD2725B1ACB266800CDD620 /* KYAEventHandler.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -689,6 +959,21 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + DA19F0BC2610810E001A6AA6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DA19F0B02610810E001A6AA6 /* KYAKit */; + targetProxy = DA19F0BB2610810E001A6AA6 /* PBXContainerItemProxy */; + }; + DA19F0BE2610810E001A6AA6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DA637B3819F14693004C8838 /* KeepingYouAwake */; + targetProxy = DA19F0BD2610810E001A6AA6 /* PBXContainerItemProxy */; + }; + DA19F0C52610810E001A6AA6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DA19F0B02610810E001A6AA6 /* KYAKit */; + targetProxy = DA19F0C42610810E001A6AA6 /* PBXContainerItemProxy */; + }; DA87FF5F21D42525009045F3 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = DA658E6A21CE907B0049F4C1 /* KeepingYouAwake Launcher */; @@ -697,6 +982,27 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + DA3D5C27261386AC00C7E103 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + DA3D5C26261386AC00C7E103 /* en */, + DA3D5C2B2613875600C7E103 /* de */, + DA3D5C2C2613878000C7E103 /* da */, + DA3D5C2D261387B800C7E103 /* nl */, + DA3D5C2E261387E000C7E103 /* fr */, + DA3D5C2F2613880600C7E103 /* id */, + DA3D5C302613881D00C7E103 /* ko */, + DA3D5C312613883700C7E103 /* pl */, + DA3D5C322613884A00C7E103 /* pt */, + DA3D5C332613886100C7E103 /* ru */, + DA3D5C342613887800C7E103 /* es */, + DA3D5C352613888D00C7E103 /* tr */, + DA3D5C36261388A700C7E103 /* zh */, + DA3D5C37261388C200C7E103 /* zh-Hant-TW */, + ); + name = Localizable.strings; + sourceTree = ""; + }; DA54C1111D69C20F00AF9E9D /* Preferences.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -783,9 +1089,126 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + DA19F0C82610810E001A6AA6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 5KESHV9W85; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = KYAKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + LOCALIZED_STRING_MACRO_NAMES = ( + "$(inherited)", + KYA_LOCALIZED_STRING, + ); + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "info.marcel-dierkes.KYAKit"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + DA19F0C92610810E001A6AA6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 5KESHV9W85; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = KYAKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + LOCALIZED_STRING_MACRO_NAMES = ( + "$(inherited)", + KYA_LOCALIZED_STRING, + ); + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "info.marcel-dierkes.KYAKit"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + DA19F0CA2610810E001A6AA6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = 5KESHV9W85; + INFOPLIST_FILE = KYAKitTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "info.marcel-dierkes.KYAKitTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KeepingYouAwake.app/Contents/MacOS/KeepingYouAwake"; + }; + name = Debug; + }; + DA19F0CB2610810E001A6AA6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEVELOPMENT_TEAM = 5KESHV9W85; + INFOPLIST_FILE = KYAKitTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "info.marcel-dierkes.KYAKitTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KeepingYouAwake.app/Contents/MacOS/KeepingYouAwake"; + }; + name = Release; + }; DA637B5419F14694004C8838 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DA7C2E161E2159D200B84F59 /* Configuration.xcconfig */; + baseConfigurationReference = DAE9C00D26107E1A00F9ED76 /* Configuration.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES; @@ -856,7 +1279,7 @@ }; DA637B5519F14694004C8838 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DA7C2E161E2159D200B84F59 /* Configuration.xcconfig */; + baseConfigurationReference = DAE9C00D26107E1A00F9ED76 /* Configuration.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES; @@ -1020,6 +1443,24 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + DA19F0CC2610810E001A6AA6 /* Build configuration list for PBXNativeTarget "KYAKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DA19F0C82610810E001A6AA6 /* Debug */, + DA19F0C92610810E001A6AA6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DA19F0CD2610810E001A6AA6 /* Build configuration list for PBXNativeTarget "KYAKitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DA19F0CA2610810E001A6AA6 /* Debug */, + DA19F0CB2610810E001A6AA6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; DA637B3419F14693004C8838 /* Build configuration list for PBXProject "KeepingYouAwake" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/KeepingYouAwake.xcodeproj/xcshareddata/xcschemes/KYAKit.xcscheme b/KeepingYouAwake.xcodeproj/xcshareddata/xcschemes/KYAKit.xcscheme new file mode 100644 index 00000000..2911c016 --- /dev/null +++ b/KeepingYouAwake.xcodeproj/xcshareddata/xcschemes/KYAKit.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeepingYouAwake.xcodeproj/xcshareddata/xcschemes/KeepingYouAwake Launcher.xcscheme b/KeepingYouAwake.xcodeproj/xcshareddata/xcschemes/KeepingYouAwake Launcher.xcscheme index b90157d1..57f61d00 100644 --- a/KeepingYouAwake.xcodeproj/xcshareddata/xcschemes/KeepingYouAwake Launcher.xcscheme +++ b/KeepingYouAwake.xcodeproj/xcshareddata/xcschemes/KeepingYouAwake Launcher.xcscheme @@ -1,6 +1,6 @@ + + + + -#import "KYAActivationDurationsController.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/KeepingYouAwake/KYAActivationDurationsMenuController/KYAActivationDurationsMenuController.m b/KeepingYouAwake/KYAActivationDurationsMenuController/KYAActivationDurationsMenuController.m index 05416f75..b5c785e8 100644 --- a/KeepingYouAwake/KYAActivationDurationsMenuController/KYAActivationDurationsMenuController.m +++ b/KeepingYouAwake/KYAActivationDurationsMenuController/KYAActivationDurationsMenuController.m @@ -9,7 +9,6 @@ #import "KYAActivationDurationsMenuController.h" #import "KYADefines.h" #import "KYALocalizedStrings.h" -#import "NSDate+RemainingTime.h" static const NSInteger KYAMenuItemRemainingTimeTag = 666; static const CGFloat KYAMenuItemDefaultFontSize = 14.0f; diff --git a/KeepingYouAwake/KYAActivationUserNotification/KYAActivationUserNotification.h b/KeepingYouAwake/KYAActivationUserNotification/KYAActivationUserNotification.h new file mode 100644 index 00000000..1063cbfb --- /dev/null +++ b/KeepingYouAwake/KYAActivationUserNotification/KYAActivationUserNotification.h @@ -0,0 +1,40 @@ +// +// KYAActivationUserNotification.h +// KeepingYouAwake +// +// Created by Marcel Dierkes on 27.02.21. +// Copyright © 2021 Marcel Dierkes. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT NSString * const KYAActivationUserNotificationIdentifier; + +/// A user notification representing activation and deactivation +/// events of a sleep/wake timer. +API_AVAILABLE(macos(11.0)) +@interface KYAActivationUserNotification : KYAUserNotification +/// The fire date of the sleep/wake timer. +@property (nonatomic, nullable, readonly) NSDate *fireDate; + +/// Returns true if the user notification represents an +/// activation event. +@property (nonatomic, getter=isActivating, readonly) BOOL activating; + ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; + +/// Creates a user notification for an activiation/deactivation event +/// with an optional fireDate representing the sleep/wake timer end date. +/// @param fireDate The sleep/wake timer's end date +/// @param activating YES if the sleep/wake timer was activated +/// or NO if deactivated. +- (instancetype)initWithFireDate:(nullable NSDate *)fireDate + activating:(BOOL)activating NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/KeepingYouAwake/KYAActivationUserNotification/KYAActivationUserNotification.m b/KeepingYouAwake/KYAActivationUserNotification/KYAActivationUserNotification.m new file mode 100644 index 00000000..809dbb6a --- /dev/null +++ b/KeepingYouAwake/KYAActivationUserNotification/KYAActivationUserNotification.m @@ -0,0 +1,59 @@ +// +// KYAActivationUserNotification.m +// KeepingYouAwake +// +// Created by Marcel Dierkes on 27.02.21. +// Copyright © 2021 Marcel Dierkes. All rights reserved. +// + +#import "KYAActivationUserNotification.h" +#import "KYADefines.h" +#import "KYALocalizedStrings.h" + +NSString * const KYAActivationUserNotificationIdentifier = @"KYAActivationIdentifier"; + +@interface KYAActivationUserNotification () +@property (nonatomic, nullable, readwrite) NSDate *fireDate; +@property (nonatomic, getter=isActivating, readwrite) BOOL activating; +@end + +@implementation KYAActivationUserNotification + +- (instancetype)initWithFireDate:(NSDate *)fireDate activating:(BOOL)activating +{ + self = [super init]; + if(self) + { + self.identifier = KYAActivationUserNotificationIdentifier; + + self.fireDate = fireDate; + self.activating = activating; + + if(activating == YES) + { + if(fireDate != nil) + { + Auto time = fireDate.kya_localizedRemainingTimeWithoutPhrase; + Auto text = KYA_L10N_PREVENTING_SLEEP_FOR_TIME_TITLE(time); + [self setLocalizedTitleWithKey:text arguments:nil]; + [self setLocalizedBodyTextWithKey:KYA_L10N_PREVENTING_SLEEP_FOR_TIME_BODY_TEXT + arguments:nil]; + } + else + { + [self setLocalizedTitleWithKey:KYA_L10N_PREVENTING_SLEEP_INDEFINITELY_TITLE + arguments:nil]; + [self setLocalizedBodyTextWithKey:KYA_L10N_PREVENTING_SLEEP_INDEFINITELY_BODY_TEXT + arguments:nil]; + } + } + else + { + [self setLocalizedTitleWithKey:KYA_L10N_ALLOWING_SLEEP_TITLE arguments:nil]; + [self setLocalizedBodyTextWithKey:KYA_L10N_ALLOWING_SLEEP_BODY_TEXT arguments:nil]; + } + } + return self; +} + +@end diff --git a/KeepingYouAwake/KYAAppController.h b/KeepingYouAwake/KYAAppController/KYAAppController.h similarity index 95% rename from KeepingYouAwake/KYAAppController.h rename to KeepingYouAwake/KYAAppController/KYAAppController.h index 7bee635e..5284d17c 100644 --- a/KeepingYouAwake/KYAAppController.h +++ b/KeepingYouAwake/KYAAppController/KYAAppController.h @@ -7,6 +7,7 @@ // #import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/KeepingYouAwake/KYAAppController.m b/KeepingYouAwake/KYAAppController/KYAAppController.m similarity index 87% rename from KeepingYouAwake/KYAAppController.m rename to KeepingYouAwake/KYAAppController/KYAAppController.m index 3222763e..1d34f10d 100644 --- a/KeepingYouAwake/KYAAppController.m +++ b/KeepingYouAwake/KYAAppController/KYAAppController.m @@ -9,20 +9,16 @@ #import "KYAAppController.h" #import "KYADefines.h" #import "KYALocalizedStrings.h" -#import "KYASleepWakeTimer.h" #import "KYAStatusItemController.h" -#import "KYAEventHandler.h" -#import "KYABatteryStatus.h" #import "KYABatteryCapacityThreshold.h" -#import "NSUserDefaults+Keys.h" #import "KYAActivationDurationsMenuController.h" -#import "NSDate+RemainingTime.h" +#import "KYAActivationUserNotification.h" // Deprecated! #define KYA_MINUTES(m) (m * 60.0f) #define KYA_HOURS(h) (h * 3600.0f) -@interface KYAAppController () +@interface KYAAppController () @property (nonatomic, readwrite) KYASleepWakeTimer *sleepWakeTimer; @property (nonatomic, readwrite) KYAStatusItemController *statusItemController; @property (nonatomic) KYAActivationDurationsMenuController *menuController; @@ -50,6 +46,8 @@ - (instancetype)init self.statusItemController = [KYAStatusItemController new]; self.statusItemController.delegate = self; + + [self configureUserNotificationCenter]; // Check activate on launch state if([self shouldActivateOnLaunch]) @@ -82,8 +80,6 @@ - (void)awakeFromNib { [super awakeFromNib]; - NSUserNotificationCenter.defaultUserNotificationCenter.delegate = self; - [self.menu setSubmenu:self.menuController.menu forItem:self.activationDurationsMenuItem]; } @@ -124,6 +120,18 @@ - (IBAction)toggleActivateOnLaunch:(id)sender [defaults synchronize]; } +#pragma mark - User Notification Center + +- (void)configureUserNotificationCenter +{ + if(@available(macOS 11.0, *)) + { + Auto center = KYAUserNotificationCenter.sharedCenter; + [center requestAuthorizationIfUndetermined]; + [center clearAllDeliveredNotifications]; + } +} + #pragma mark - Sleep Wake Timer Handling - (void)activateTimer @@ -149,12 +157,12 @@ - (void)activateTimerWithTimeInterval:(NSTimeInterval)timeInterval } KYA_AUTO timerCompletion = ^(BOOL cancelled) { - // Post notifications - if([defaults kya_areNotificationsEnabled]) + // Post deactivation notification + if(@available(macOS 11.0, *)) { - NSUserNotification *n = [NSUserNotification new]; - n.informativeText = KYA_L10N_ALLOWING_YOUR_MAC_TO_GO_TO_SLEEP; - [NSUserNotificationCenter.defaultUserNotificationCenter scheduleNotification:n]; + Auto notification = [[KYAActivationUserNotification alloc] initWithFireDate:nil + activating:NO]; + [KYAUserNotificationCenter.sharedCenter postNotification:notification]; } // Quit on timer expiration @@ -165,22 +173,13 @@ - (void)activateTimerWithTimeInterval:(NSTimeInterval)timeInterval }; [self.sleepWakeTimer scheduleWithTimeInterval:timeInterval completion:timerCompletion]; - // Post notifications - if([defaults kya_areNotificationsEnabled]) + // Post activation notification + if(@available(macOS 11.0, *)) { - NSUserNotification *n = [NSUserNotification new]; - - if(timeInterval == KYASleepWakeTimeIntervalIndefinite) - { - n.informativeText = KYA_L10N_PREVENTING_YOUR_MAC_FROM_GOING_TO_SLEEP; - } - else - { - KYA_AUTO remainingTimeString = self.sleepWakeTimer.fireDate.kya_localizedRemainingTimeWithoutPhrase; - n.informativeText = KYA_L10N_PREVENTING_SLEEP_FOR_REMAINING_TIME(remainingTimeString); - } - - [NSUserNotificationCenter.defaultUserNotificationCenter scheduleNotification:n]; + Auto fireDate = self.sleepWakeTimer.fireDate; + Auto notification = [[KYAActivationUserNotification alloc] initWithFireDate:fireDate + activating:YES]; + [KYAUserNotificationCenter.sharedCenter postNotification:notification]; } } @@ -195,13 +194,6 @@ - (void)terminateTimer } } -#pragma mark - User Notification Center Delegate - -- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification -{ - return YES; -} - #pragma mark - Battery Status - (KYABatteryStatus *)batteryStatus diff --git a/KeepingYouAwake/KYAAppDelegate.h b/KeepingYouAwake/KYAAppController/KYAAppDelegate.h similarity index 100% rename from KeepingYouAwake/KYAAppDelegate.h rename to KeepingYouAwake/KYAAppController/KYAAppDelegate.h diff --git a/KeepingYouAwake/KYAAppDelegate.m b/KeepingYouAwake/KYAAppController/KYAAppDelegate.m similarity index 70% rename from KeepingYouAwake/KYAAppDelegate.m rename to KeepingYouAwake/KYAAppController/KYAAppDelegate.m index 3ff94fbd..aa28bd93 100644 --- a/KeepingYouAwake/KYAAppDelegate.m +++ b/KeepingYouAwake/KYAAppController/KYAAppDelegate.m @@ -8,7 +8,8 @@ #import "KYAAppDelegate.h" #import -#import "NSUserDefaults+Keys.h" +#import +#import "KYADefines.h" #import "KYAPreferencesWindowController.h" @interface KYAAppDelegate () @@ -51,17 +52,16 @@ - (void)windowWillClose:(NSNotification *)notification - (NSString *)feedURLStringForUpdater:(SPUUpdater *)updater { - NSString *feedURLString = NSBundle.mainBundle.infoDictionary[@"SUFeedURL"]; - NSAssert(feedURLString != nil, @"A feed URL should be set in Info.plist"); - - if([NSUserDefaults.standardUserDefaults kya_arePreReleaseUpdatesEnabled]) + Auto bundle = NSBundle.mainBundle; + Auto defaults = NSUserDefaults.standardUserDefaults; + if([defaults kya_arePreReleaseUpdatesEnabled]) { - NSString *lastComponent = feedURLString.lastPathComponent; - NSString *baseURLString = feedURLString.stringByDeletingLastPathComponent; - return [NSString stringWithFormat:@"%@/prerelease-%@", baseURLString, lastComponent]; + return bundle.kya_preReleaseUpdateFeedURLString; + } + else + { + return bundle.kya_updateFeedURLString; } - - return feedURLString; } @end diff --git a/KeepingYouAwake/KYADefines.h b/KeepingYouAwake/KYADefines.h index f8e12fe8..b86d42c2 100644 --- a/KeepingYouAwake/KYADefines.h +++ b/KeepingYouAwake/KYADefines.h @@ -9,12 +9,14 @@ #ifndef KYA_DEFINES_H #define KYA_DEFINES_H +#define Auto const __auto_type +#define AutoVar __auto_type + +// These three are considered deprecated: #define KYA_AUTO __auto_type const #define KYA_AUTO_VAR __auto_type #define KYA_WEAK __weak __auto_type -#define KYA_SDK_IS_MACOS_11 (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101600) - #if DEBUG #define KYALog(_args...) NSLog(_args) #else diff --git a/KeepingYouAwake/KYALocalizedStrings.m b/KeepingYouAwake/KYALocalizedStrings.m index 20459d37..4ebfb9a1 100644 --- a/KeepingYouAwake/KYALocalizedStrings.m +++ b/KeepingYouAwake/KYALocalizedStrings.m @@ -16,14 +16,6 @@ #pragma mark - -#define KYA_L10N_ALLOWING_YOUR_MAC_TO_GO_TO_SLEEP NSLocalizedString(@"Allowing your Mac to go to sleep…", @"Allowing your Mac to go to sleep…") -#define KYA_L10N_PREVENTING_YOUR_MAC_FROM_GOING_TO_SLEEP NSLocalizedString(@"Preventing your Mac from going to sleep…", @"Preventing your Mac from going to sleep…") - -#define KYA_L10N_FORMAT_PREVENTING_SLEEP_FOR_REMAINING_TIME NSLocalizedString(@"Preventing your Mac from going to sleep for\n%@…", @"Preventing your Mac from going to sleep for\n%@…") -#define KYA_L10N_PREVENTING_SLEEP_FOR_REMAINING_TIME(_str) [NSString stringWithFormat:KYA_L10N_FORMAT_PREVENTING_SLEEP_FOR_REMAINING_TIME, (NSString *)(_str)] - -#define KYA_L10N_INDEFINITELY NSLocalizedString(@"Indefinitely", @"Indefinitely") - #define KYA_L10N_ACTIVATE_FOR_DURATION NSLocalizedString(@"Activate for Duration", @"Activate for Duration") #define KYA_L10N_IS_DEFAULT_SUFFIX NSLocalizedString(@"(Default)", @"(Default)") @@ -32,9 +24,23 @@ #define KYA_L10N_DURATION_INVALID_INPUT NSLocalizedString(@"The entered duration is invalid. Please try again.", @"The entered duration is invalid. Please try again.") +#pragma mark - Notifications + +#define KYA_L10N_PREVENTING_SLEEP_INDEFINITELY_TITLE NSLocalizedString(@"Preventing Sleep", @"Preventing Sleep") + +#define KYA_L10N_PREVENTING_SLEEP_INDEFINITELY_BODY_TEXT NSLocalizedString(@"You can still manually enable sleep mode for your Mac.", @"You can still manually enable sleep mode for your Mac.") + +#define KYA_L10N_FORMAT_PREVENTING_SLEEP_FOR_TIME_TITLE NSLocalizedString(@"Preventing Sleep for %@", @"Preventing Sleep for %@") +#define KYA_L10N_PREVENTING_SLEEP_FOR_TIME_TITLE(_str) [NSString stringWithFormat:KYA_L10N_FORMAT_PREVENTING_SLEEP_FOR_TIME_TITLE, (NSString *)(_str)] + +#define KYA_L10N_PREVENTING_SLEEP_FOR_TIME_BODY_TEXT NSLocalizedString(@"Afterwards your Mac will automatically go to sleep again when unused.", @"Afterwards your Mac will automatically go to sleep again when unused.") + +#define KYA_L10N_ALLOWING_SLEEP_TITLE NSLocalizedString(@"Allowing Sleep", @"Allowing Sleep") + +#define KYA_L10N_ALLOWING_SLEEP_BODY_TEXT NSLocalizedString(@"Your Mac will automatically go to sleep when unused.", @"Your Mac will automatically go to sleep when unused.") + #pragma mark - Preferences -#define KYA_L10N_ENABLE_EXPERIMENTAL_NOTIFICATION_CENTER_INTEGRATION NSLocalizedString(@"Enable experimental Notification Center integration", @"Enable experimental Notification Center integration") #define KYA_L10N_DISABLE_MENU_BAR_ICON_HIGHLIGHT_COLOR NSLocalizedString(@"Disable menu bar icon highlight color", @"Disable menu bar icon highlight color") #define KYA_L10N_QUIT_ON_TIMER_EXPIRATION NSLocalizedString(@"Quit when activation duration is over", @"Quit when activation duration is over") #define KYA_L10N_ALLOW_DISPLAY_SLEEP NSLocalizedString(@"Allow the display to sleep", @"Allow the display to sleep") diff --git a/KeepingYouAwake/MenuBar Icon/KYAMenuBarIcon.h b/KeepingYouAwake/KYAMenuBarIcon/KYAMenuBarIcon.h similarity index 100% rename from KeepingYouAwake/MenuBar Icon/KYAMenuBarIcon.h rename to KeepingYouAwake/KYAMenuBarIcon/KYAMenuBarIcon.h diff --git a/KeepingYouAwake/MenuBar Icon/KYAMenuBarIcon.m b/KeepingYouAwake/KYAMenuBarIcon/KYAMenuBarIcon.m similarity index 100% rename from KeepingYouAwake/MenuBar Icon/KYAMenuBarIcon.m rename to KeepingYouAwake/KYAMenuBarIcon/KYAMenuBarIcon.m diff --git a/KeepingYouAwake/StatusItemController/KYAStatusItemController.h b/KeepingYouAwake/KYAStatusItemController/KYAStatusItemController.h similarity index 98% rename from KeepingYouAwake/StatusItemController/KYAStatusItemController.h rename to KeepingYouAwake/KYAStatusItemController/KYAStatusItemController.h index 0e616ce6..5386f93e 100644 --- a/KeepingYouAwake/StatusItemController/KYAStatusItemController.h +++ b/KeepingYouAwake/KYAStatusItemController/KYAStatusItemController.h @@ -7,6 +7,7 @@ // #import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/KeepingYouAwake/StatusItemController/KYAStatusItemController.m b/KeepingYouAwake/KYAStatusItemController/KYAStatusItemController.m similarity index 99% rename from KeepingYouAwake/StatusItemController/KYAStatusItemController.m rename to KeepingYouAwake/KYAStatusItemController/KYAStatusItemController.m index e13235c7..9eefc51c 100644 --- a/KeepingYouAwake/StatusItemController/KYAStatusItemController.m +++ b/KeepingYouAwake/KYAStatusItemController/KYAStatusItemController.m @@ -8,7 +8,6 @@ #import "KYAStatusItemController.h" #import "KYADefines.h" -#import "NSUserDefaults+Keys.h" #import "KYAMenuBarIcon.h" @interface KYAStatusItemController () diff --git a/KeepingYouAwake/Preferences/About/KYAAboutPreferencesViewController.h b/KeepingYouAwake/Preferences/About/KYAAboutPreferencesViewController.h index e7c5ee88..d68729ef 100644 --- a/KeepingYouAwake/Preferences/About/KYAAboutPreferencesViewController.h +++ b/KeepingYouAwake/Preferences/About/KYAAboutPreferencesViewController.h @@ -7,6 +7,7 @@ // #import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/KeepingYouAwake/Preferences/About/KYAAboutPreferencesViewController.m b/KeepingYouAwake/Preferences/About/KYAAboutPreferencesViewController.m index 9b1a2ee3..4252ebf1 100644 --- a/KeepingYouAwake/Preferences/About/KYAAboutPreferencesViewController.m +++ b/KeepingYouAwake/Preferences/About/KYAAboutPreferencesViewController.m @@ -7,7 +7,6 @@ // #import "KYAAboutPreferencesViewController.h" -#import "NSApplication+Versions.h" @interface KYAAboutPreferencesViewController () @end @@ -25,12 +24,12 @@ - (void)viewWillAppear - (NSString *)versionText { - return NSApplication.sharedApplication.kya_localizedVersionString; + return NSBundle.mainBundle.kya_localizedVersionString; } - (NSString *)copyrightText { - return NSApplication.sharedApplication.kya_localizedCopyrightString; + return NSBundle.mainBundle.kya_localizedCopyrightString; } - (id)creditsFileURL diff --git a/KeepingYouAwake/Preferences/ActivationDuration/KYAAddDurationPreferencesViewController.h b/KeepingYouAwake/Preferences/ActivationDuration/KYAAddDurationPreferencesViewController.h index 3e346a12..24f3a6cf 100644 --- a/KeepingYouAwake/Preferences/ActivationDuration/KYAAddDurationPreferencesViewController.h +++ b/KeepingYouAwake/Preferences/ActivationDuration/KYAAddDurationPreferencesViewController.h @@ -7,6 +7,7 @@ // #import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/KeepingYouAwake/Preferences/ActivationDuration/KYAAddDurationPreferencesViewController.m b/KeepingYouAwake/Preferences/ActivationDuration/KYAAddDurationPreferencesViewController.m index 1ff9683b..e07e488b 100644 --- a/KeepingYouAwake/Preferences/ActivationDuration/KYAAddDurationPreferencesViewController.m +++ b/KeepingYouAwake/Preferences/ActivationDuration/KYAAddDurationPreferencesViewController.m @@ -9,7 +9,6 @@ #import "KYAAddDurationPreferencesViewController.h" #import "KYADefines.h" #import "KYALocalizedStrings.h" -#import "KYAActivationDurationsController.h" static const NSInteger KYAMaximumHours = 999; static const NSInteger KYAMaximumMinutes = 59; diff --git a/KeepingYouAwake/Preferences/ActivationDuration/KYADurationPreferencesViewController.h b/KeepingYouAwake/Preferences/ActivationDuration/KYADurationPreferencesViewController.h index add159b6..dd741e79 100644 --- a/KeepingYouAwake/Preferences/ActivationDuration/KYADurationPreferencesViewController.h +++ b/KeepingYouAwake/Preferences/ActivationDuration/KYADurationPreferencesViewController.h @@ -7,6 +7,7 @@ // #import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/KeepingYouAwake/Preferences/Advanced/KYAAdvancedPreferencesViewController.h b/KeepingYouAwake/Preferences/Advanced/KYAAdvancedPreferencesViewController.h index f2f44fe3..c6553270 100644 --- a/KeepingYouAwake/Preferences/Advanced/KYAAdvancedPreferencesViewController.h +++ b/KeepingYouAwake/Preferences/Advanced/KYAAdvancedPreferencesViewController.h @@ -7,6 +7,7 @@ // #import +#import @interface KYAAdvancedPreferencesViewController : NSViewController diff --git a/KeepingYouAwake/Preferences/Advanced/KYAAdvancedPreferencesViewController.m b/KeepingYouAwake/Preferences/Advanced/KYAAdvancedPreferencesViewController.m index 30a43dfa..b33ad5d7 100644 --- a/KeepingYouAwake/Preferences/Advanced/KYAAdvancedPreferencesViewController.m +++ b/KeepingYouAwake/Preferences/Advanced/KYAAdvancedPreferencesViewController.m @@ -10,8 +10,6 @@ #import "KYADefines.h" #import "KYALocalizedStrings.h" #import "KYAPreference.h" -#import "KYABatteryStatus.h" -#import "NSUserDefaults+Keys.h" #import "KYABatteryCapacityThreshold.h" @interface KYAAdvancedPreferencesViewController () @@ -45,10 +43,6 @@ - (void)configureAdvancedPreferences { KYA_AUTO preferences = [NSMutableArray new]; - [preferences addObject:[[KYAPreference alloc] initWithTitle:KYA_L10N_ENABLE_EXPERIMENTAL_NOTIFICATION_CENTER_INTEGRATION - defaultsKey:KYAUserDefaultsKeyNotificationsEnabled - ]]; - [preferences addObject:[[KYAPreference alloc] initWithTitle:KYA_L10N_DISABLE_MENU_BAR_ICON_HIGHLIGHT_COLOR defaultsKey:KYAUserDefaultsKeyMenuBarIconHighlightDisabled ]]; diff --git a/KeepingYouAwake/Preferences/Base.lproj/Preferences.storyboard b/KeepingYouAwake/Preferences/Base.lproj/Preferences.storyboard index 19993eef..0c3b31f4 100644 --- a/KeepingYouAwake/Preferences/Base.lproj/Preferences.storyboard +++ b/KeepingYouAwake/Preferences/Base.lproj/Preferences.storyboard @@ -1,9 +1,9 @@ - + - + @@ -68,14 +68,14 @@ - + - + - + @@ -140,10 +150,12 @@ + + @@ -155,6 +167,7 @@ + @@ -172,19 +185,19 @@ - + - + - + - + @@ -197,7 +210,7 @@ - + - + - + @@ -290,7 +303,7 @@ - + @@ -333,7 +346,7 @@ - + @@ -384,10 +397,10 @@ - +