Skip to content
This repository was archived by the owner on Aug 5, 2024. It is now read-only.

Commit c8bedc6

Browse files
committed
Add support for macOS 10.13 and above (#22)
1 parent 549a5ec commit c8bedc6

File tree

5 files changed

+30
-22
lines changed

5 files changed

+30
-22
lines changed

Nocturnal.xcodeproj/project.pbxproj

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@
409409
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
410410
CLANG_WARN_UNREACHABLE_CODE = YES;
411411
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
412+
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
413+
CODE_SIGN_STYLE = Manual;
412414
COPY_PHASE_STRIP = NO;
413415
DEBUG_INFORMATION_FORMAT = dwarf;
414416
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -433,7 +435,7 @@
433435
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
434436
GCC_WARN_UNUSED_FUNCTION = YES;
435437
GCC_WARN_UNUSED_VARIABLE = YES;
436-
MACOSX_DEPLOYMENT_TARGET = 10.15;
438+
MACOSX_DEPLOYMENT_TARGET = 10.13;
437439
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
438440
MTL_FAST_MATH = YES;
439441
ONLY_ACTIVE_ARCH = YES;
@@ -476,6 +478,8 @@
476478
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
477479
CLANG_WARN_UNREACHABLE_CODE = YES;
478480
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
481+
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
482+
CODE_SIGN_STYLE = Manual;
479483
COPY_PHASE_STRIP = NO;
480484
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
481485
ENABLE_NS_ASSERTIONS = NO;
@@ -494,7 +498,7 @@
494498
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
495499
GCC_WARN_UNUSED_FUNCTION = YES;
496500
GCC_WARN_UNUSED_VARIABLE = YES;
497-
MACOSX_DEPLOYMENT_TARGET = 10.15;
501+
MACOSX_DEPLOYMENT_TARGET = 10.13;
498502
MTL_ENABLE_DEBUG_INFO = NO;
499503
MTL_FAST_MATH = YES;
500504
SDKROOT = macosx;
@@ -509,11 +513,12 @@
509513
buildSettings = {
510514
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
511515
CODE_SIGN_ENTITLEMENTS = Nocturnal/Nocturnal.entitlements;
512-
CODE_SIGN_IDENTITY = "Apple Development";
513-
CODE_SIGN_STYLE = Automatic;
516+
CODE_SIGN_IDENTITY = "-";
517+
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
518+
CODE_SIGN_STYLE = Manual;
514519
COMBINE_HIDPI_IMAGES = YES;
515520
DEVELOPMENT_ASSET_PATHS = "";
516-
DEVELOPMENT_TEAM = 28M363UQ4A;
521+
DEVELOPMENT_TEAM = "";
517522
ENABLE_HARDENED_RUNTIME = YES;
518523
FRAMEWORK_SEARCH_PATHS = (
519524
"$(inherited)",
@@ -531,7 +536,8 @@
531536
"$(inherited)",
532537
"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/CoreBrightness.framework/Versions/A",
533538
);
534-
MARKETING_VERSION = 1.1;
539+
MACOSX_DEPLOYMENT_TARGET = 10.13;
540+
MARKETING_VERSION = 1.1.1;
535541
PRODUCT_BUNDLE_IDENTIFIER = com.joshua.jon.Nocturnal;
536542
PRODUCT_NAME = "$(TARGET_NAME)";
537543
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -545,11 +551,12 @@
545551
buildSettings = {
546552
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
547553
CODE_SIGN_ENTITLEMENTS = Nocturnal/Nocturnal.entitlements;
548-
CODE_SIGN_IDENTITY = "Apple Development";
549-
CODE_SIGN_STYLE = Automatic;
554+
CODE_SIGN_IDENTITY = "-";
555+
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
556+
CODE_SIGN_STYLE = Manual;
550557
COMBINE_HIDPI_IMAGES = YES;
551558
DEVELOPMENT_ASSET_PATHS = "";
552-
DEVELOPMENT_TEAM = 28M363UQ4A;
559+
DEVELOPMENT_TEAM = "";
553560
ENABLE_HARDENED_RUNTIME = YES;
554561
FRAMEWORK_SEARCH_PATHS = (
555562
"$(inherited)",
@@ -567,7 +574,8 @@
567574
"$(inherited)",
568575
"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/CoreBrightness.framework/Versions/A",
569576
);
570-
MARKETING_VERSION = 1.1;
577+
MACOSX_DEPLOYMENT_TARGET = 10.13;
578+
MARKETING_VERSION = 1.1.1;
571579
PRODUCT_BUNDLE_IDENTIFIER = com.joshua.jon.Nocturnal;
572580
PRODUCT_NAME = "$(TARGET_NAME)";
573581
PROVISIONING_PROFILE_SPECIFIER = "";

Nocturnal/Application/Main/Base.lproj/Main.storyboard

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,23 +271,23 @@
271271
<rect key="frame" x="19" y="10" width="289" height="212"/>
272272
<subviews>
273273
<stackView distribution="fill" orientation="vertical" alignment="centerX" spacing="1" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5xL-6j-Oyi">
274-
<rect key="frame" x="112" y="116" width="64" height="96"/>
274+
<rect key="frame" x="110" y="116" width="68" height="96"/>
275275
<subviews>
276276
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="NM2-pf-5o2">
277-
<rect key="frame" x="0.0" y="32" width="64" height="64"/>
277+
<rect key="frame" x="2" y="32" width="64" height="64"/>
278278
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="AppIconImage" id="j65-sS-hPB"/>
279279
</imageView>
280280
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="PR9-0C-32n">
281-
<rect key="frame" x="-2" y="15" width="68" height="16"/>
281+
<rect key="frame" x="0.0" y="15" width="68" height="16"/>
282282
<textFieldCell key="cell" lineBreakMode="clipping" title="Nocturnal" id="1Z1-tb-qIn">
283283
<font key="font" metaFont="systemBold"/>
284284
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
285285
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
286286
</textFieldCell>
287287
</textField>
288288
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1tA-dk-F5j">
289-
<rect key="frame" x="0.0" y="0.0" width="64" height="14"/>
290-
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Version 1.1" id="LBM-hk-c59">
289+
<rect key="frame" x="-2" y="0.0" width="72" height="14"/>
290+
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Version 1.1.1" id="LBM-hk-c59">
291291
<font key="font" metaFont="controlContent" size="11"/>
292292
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
293293
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>

Nocturnal/Application/Menu/MenuController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class MenuController: NSMenu, NSMenuDelegate {
3131
timerMenuItem.isHidden = true
3232
setupNightShiftMenuItems()
3333
setupDimnessMenuItems()
34-
// Check if Mac supports TouchBar
34+
// Check if Mac supports Touch Bar
3535
if NSClassFromString("NSTouchBar") == nil {
3636
turnOffTouchBarMenuItem.isEnabled = false
3737
turnOffTouchBarMenuItem.isHidden = true
@@ -77,7 +77,7 @@ class MenuController: NSMenu, NSMenuDelegate {
7777

7878
setTimerText(StateManager.isTimerEnabled)
7979

80-
// TouchBar
80+
// Touch Bar
8181
turnOffTouchBarMenuItem.state = StateManager.isTouchBarOff ? .on : .off
8282
}
8383

Nocturnal/Utils/Utils.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ class Utils {
2929
}
3030

3131
static func verifyMacOsVersion() {
32-
if !ProcessInfo().isOperatingSystemAtLeast(OperatingSystemVersion(majorVersion: 10, minorVersion: 15, patchVersion: 0)) {
32+
if !ProcessInfo().isOperatingSystemAtLeast(OperatingSystemVersion(majorVersion: 10, minorVersion: 13, patchVersion: 0)) {
3333
NSApplication.shared.activate(ignoringOtherApps: true)
3434
let version = ProcessInfo().operatingSystemVersionString
3535
let message = "Nocturnal is not supported on this version of macOS"
36-
let info = "\(version) does not support Nocturnal. Please update macOS to version 10.15 (Catalina) or higher."
36+
let info = "\(version) does not support Nocturnal. Please update macOS to version 10.13 (High Sierra) or higher."
3737
let alert = Utils.createAlert(message, info)
3838
alert.runModal()
3939
NSApplication.shared.terminate(self)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Swift Version](https://img.shields.io/badge/swift-5.0-lightgrey.svg)](https://swift.org/)
2-
[![macOS Version](https://img.shields.io/badge/macOS->=10.15%20Catalina-lightgrey.svg)](https://www.apple.com/macos/catalina/)
2+
[![macOS Version](https://img.shields.io/badge/macOS->=10.13%20High%20Sierra-lightgrey.svg)](https://support.apple.com/en-us/HT208969)
33
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-lightgrey.svg)](https://www.gnu.org/licenses/gpl-3.0)
44
<p align="center">
55
<br>
@@ -12,15 +12,15 @@
1212

1313
### About
1414

15-
Nocturnal is a menu bar app for macOS that allows you to go the extra mile in controlling your display settings to reduce strain on your eyes. It includes darker than dark dimming, Night Shift fine tuning, multi-monitor support, and the ability to turn off TouchBar on Macbook Pro.
15+
Nocturnal is a menu bar app for macOS that allows you to go the extra mile in controlling your display settings to reduce strain on your eyes. It includes darker than dark dimming, Night Shift fine tuning, multi-monitor support, and the ability to turn off Touch Bar on Macbook Pro.
1616

1717
<p align="center">
1818
<img src="Docs/Images/Nocturnal-Screenshot.png" alt="icon" height="350">
1919
</p>
2020

2121
### System Requirements
2222

23-
Nocturnal is only supported on macOS Catalina 10.15 or later, and requires a Mac that supports [Night Shift](https://support.apple.com/en-us/HT207513#requirements).
23+
Nocturnal is only supported on macOS High Sierra 10.13 or later, and requires a Mac that supports [Night Shift](https://support.apple.com/en-us/HT207513#requirements).
2424

2525
### Installation
2626

0 commit comments

Comments
 (0)