Skip to content

Commit

Permalink
Set target OS to 10.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Hanson committed Nov 23, 2019
1 parent c7a6667 commit 1dde0f0
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 24 deletions.
36 changes: 18 additions & 18 deletions Rectangle.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -793,17 +793,17 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = RectangleLauncher/RectangleLauncher.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = XSYZ3E4B7D;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = RectangleLauncher/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = com.knollsoft.RectangleLauncher;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -818,17 +818,17 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = RectangleLauncher/RectangleLauncher.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = XSYZ3E4B7D;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = RectangleLauncher/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = com.knollsoft.RectangleLauncher;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -889,7 +889,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -945,7 +945,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
Expand All @@ -960,19 +960,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Rectangle/Rectangle.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 14;
CURRENT_PROJECT_VERSION = 15;
DEVELOPMENT_TEAM = XSYZ3E4B7D;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = Rectangle/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 0.10;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 0.10.1;
PRODUCT_BUNDLE_IDENTIFIER = com.knollsoft.Rectangle;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -986,19 +986,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Rectangle/Rectangle.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 14;
CURRENT_PROJECT_VERSION = 15;
DEVELOPMENT_TEAM = XSYZ3E4B7D;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = Rectangle/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 0.10;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 0.10.1;
PRODUCT_BUNDLE_IDENTIFIER = com.knollsoft.Rectangle;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
16 changes: 12 additions & 4 deletions Rectangle/AccessibilityElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ class AccessibilityElement {

static func frontmostWindow() -> AccessibilityElement? {
guard let frontmostApplicationElement = AccessibilityElement.frontmostApplication() else {
os_log("Failed to find the application that currently has focus.", type: .info)
if #available(OSX 10.12, *) {
os_log("Failed to find the application that currently has focus.", type: .info)
}
return nil
}
let focusedAttr = NSAccessibility.Attribute.focusedWindow as CFString
Expand All @@ -42,7 +44,9 @@ class AccessibilityElement {
return AccessibilityElement(copiedUnderlyingElement as! AXUIElement)
}
}
os_log("Unable to obtain accessibility element", type: .debug)
if #available(OSX 10.12, *) {
os_log("Unable to obtain accessibility element", type: .debug)
}
return nil
}

Expand Down Expand Up @@ -118,7 +122,9 @@ class AccessibilityElement {
if let value = AXValue.from(value: position, type: .cgPoint) {
AXUIElementSetAttributeValue(self.underlyingElement, kAXPositionAttribute as CFString, value)
if Defaults.debug.enabled {
os_log("AX position proposed: %{public}@, result: %{public}@", type: .debug, position.debugDescription, getPosition()?.debugDescription ?? "N/A")
if #available(OSX 10.12, *) {
os_log("AX position proposed: %{public}@, result: %{public}@", type: .debug, position.debugDescription, getPosition()?.debugDescription ?? "N/A")
}
}
}
}
Expand All @@ -131,7 +137,9 @@ class AccessibilityElement {
if let value = AXValue.from(value: size, type: .cgSize) {
AXUIElementSetAttributeValue(self.underlyingElement, kAXSizeAttribute as CFString, value)
if Defaults.debug.enabled {
os_log("AX sizing proposed: %{public}@, result: %{public}@", type: .debug, size.debugDescription, getSize()?.debugDescription ?? "N/A")
if #available(OSX 10.12, *) {
os_log("AX sizing proposed: %{public}@, result: %{public}@", type: .debug, size.debugDescription, getSize()?.debugDescription ?? "N/A")
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion Rectangle/WindowManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ class WindowManager {
)

if Defaults.debug.enabled {
os_log("%{public}@ | display: %{public}@, calculatedRect: %{public}@, resultRect: %{public}@", type: .debug, action.name, visibleFrameOfDestinationScreen.debugDescription, newNormalizedRect.debugDescription, resultingRect.debugDescription)
if #available(OSX 10.12, *) {
os_log("%{public}@ | display: %{public}@, calculatedRect: %{public}@, resultRect: %{public}@", type: .debug, action.name, visibleFrameOfDestinationScreen.debugDescription, newNormalizedRect.debugDescription, resultingRect.debugDescription)
}
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion RectangleLauncher/RectangleLauncher.entitlements
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>

0 comments on commit 1dde0f0

Please sign in to comment.