Skip to content

Commit

Permalink
Upgraded to Swift 5
Browse files Browse the repository at this point in the history
  • Loading branch information
planecore committed Jun 18, 2019
1 parent ae89d15 commit 0d84b3b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Auto Dark.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
TargetAttributes = {
905E4A7421A19E2500D1DBC7 = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1020;
SystemCapabilities = {
com.apple.Sandbox = {
enabled = 0;
Expand Down Expand Up @@ -322,7 +323,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.14;
PRODUCT_BUNDLE_IDENTIFIER = "com.matan.Auto-Dark";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -342,7 +343,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.14;
PRODUCT_BUNDLE_IDENTIFIER = "com.matan.Auto-Dark";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
1 change: 1 addition & 0 deletions Auto Dark/DarkMode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ struct DarkMode {
static func toggle(force: Bool? = nil) {
let value = force.map(String.init) ?? "not dark mode"
let command = "\(prefix) set dark mode to \(value)"
Logger.log("Setting dark mode to \(value)")
runAppleScript(command)
}

Expand Down
4 changes: 2 additions & 2 deletions Auto Dark/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.2</string>
<string>1.5</string>
<key>CFBundleVersion</key>
<string>12</string>
<string>14</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions Auto Dark/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ struct Logger {
Gets a message, prints it and appends it to the log.
- Parameters:
- message: The message to save.
- withTime: Includes the time of the message if true.
- message: The message to save.
- withTime: Includes the time of the message if true.
*/
static func log(_ message: String, withTime: Bool = true) {
let save = withTime ? getTime() + " " + message : message
Expand Down

0 comments on commit 0d84b3b

Please sign in to comment.