Added UIDesignRequiresCompatibility so the project is properly compiled with XCode 26.

This commit is contained in:
waydabber 2026-04-19 08:34:11 +02:00
parent 86f8ab68aa
commit d3bfea0572
10 changed files with 31 additions and 34 deletions

View file

@ -168,5 +168,5 @@ enum Command: UInt8 {
case bottomLeftScreenPurity = 0xEA
case bottomRightScreenPurity = 0xEB
public static let brightness = luminance
static let brightness = luminance
}

View file

@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>7123</string>
<string>7125</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
@ -36,5 +36,7 @@
<string>https://monitorcontrol.app/appcast2.xml</string>
<key>SUPublicEDKey</key>
<string>ITSTMp8AypsLawojJ+UR3tm2mN18AFoNMvXf1G3t62s=</string>
<key>UIDesignRequiresCompatibility</key>
<true/>
</dict>
</plist>

View file

@ -11,7 +11,7 @@ class AppleDisplay: Display {
super.init(identifier, name: name, vendorNumber: vendorNumber, modelNumber: modelNumber, serialNumber: serialNumber, isVirtual: isVirtual, isDummy: isDummy)
}
public func getAppleBrightness() -> Float {
func getAppleBrightness() -> Float {
guard !self.isDummy else {
return 1
}
@ -20,7 +20,7 @@ class AppleDisplay: Display {
return brightness
}
public func setAppleBrightness(value: Float) {
func setAppleBrightness(value: Float) {
guard !self.isDummy else {
return
}

View file

@ -377,7 +377,7 @@ class OtherDisplay: Display {
return intCodes
}
public func writeDDCValues(command: Command, value: UInt16) {
func writeDDCValues(command: Command, value: UInt16) {
guard app.sleepID == 0, app.reconfigureID == 0, !self.readPrefAsBool(key: .forceSw), !self.readPrefAsBool(key: .unavailableDDC, for: command) else {
return
}

View file

@ -8,9 +8,9 @@ let ARM64_DDC_DATA_ADDRESS: UInt8 = 0x51
class Arm64DDC: NSObject {
#if arch(arm64)
public static let isArm64: Bool = true
static let isArm64: Bool = true
#else
public static let isArm64: Bool = false
static let isArm64: Bool = false
#endif
static let MAX_MATCH_SCORE: Int = 20

View file

@ -5,7 +5,7 @@ import CoreGraphics
import os.log
class DisplayManager {
public static let shared = DisplayManager()
static let shared = DisplayManager()
var displays: [Display] = []
var audioControlTargetDisplays: [OtherDisplay] = []
@ -177,6 +177,7 @@ class DisplayManager {
let isDummy: Bool = DisplayManager.isDummy(displayID: onlineDisplayID)
let isVirtual: Bool = DisplayManager.isVirtual(displayID: onlineDisplayID)
if !DEBUG_SW, DisplayManager.isAppleDisplay(displayID: onlineDisplayID) { // MARK: (point of interest for testing)
let appleDisplay = AppleDisplay(id, name: name, vendorNumber: vendorNumber, modelNumber: modelNumber, serialNumber: serialNumber, isVirtual: isVirtual, isDummy: isDummy)
os_log("Apple display found - %{public}@", type: .info, "ID: \(appleDisplay.identifier), Name: \(appleDisplay.name) (Vendor: \(appleDisplay.vendorNumber ?? 0), Model: \(appleDisplay.modelNumber ?? 0))")
self.addDisplay(display: appleDisplay)
@ -519,6 +520,7 @@ class DisplayManager {
}
}
if let screen = getByDisplayID(displayID: displayID) { // MARK: This, and NSScreen+Extension.swift will not be needed when we drop MacOS 10 support.
if #available(macOS 10.15, *) {
return screen.localizedName
} else {

View file

@ -209,7 +209,7 @@ class SliderHandler {
}
}
public init(display: Display?, command: Command, title: String = "", position _: Int = 0) {
init(display: Display?, command: Command, title: String = "", position _: Int = 0) {
self.command = command
self.title = title
let slider = SliderHandler.MCSlider(value: 0, minValue: 0, maxValue: 1, target: self, action: #selector(SliderHandler.valueChanged))

View file

@ -67,7 +67,7 @@ class DisplaysPrefsViewController: NSViewController, SettingsPane, NSTableViewDa
self.displays.count
}
public static func isImac() -> Bool {
static func isImac() -> Bool {
let platformExpertDevice = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"))
if let modelIdentifier = IORegistryEntryCreateCFProperty(platformExpertDevice, "model" as CFString, kCFAllocatorDefault, 0).takeRetainedValue() as? String {
return modelIdentifier.contains("iMac")
@ -75,14 +75,14 @@ class DisplaysPrefsViewController: NSViewController, SettingsPane, NSTableViewDa
return false
}
public struct DisplayInfo {
struct DisplayInfo {
var displayType = ""
var displayImage = ""
var controlMethod = ""
var controlStatus = ""
}
public static func getDisplayInfo(display: Display) -> DisplayInfo {
static func getDisplayInfo(display: Display) -> DisplayInfo {
var displayType = NSLocalizedString("Other Display", comment: "Shown in the Display Settings")
var displayImage = "display.trianglebadge.exclamationmark"
var controlMethod = NSLocalizedString("No Control", comment: "Shown in the Display Settings") + " ⚠️"

View file

@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>7123</string>
<string>7125</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSBackgroundOnly</key>

View file

@ -1,7 +1,7 @@
<img src=".github/Icon-cropped.png" width="200" alt="App icon" align="left"/>
<div>
<h3>MonitorControl - now compatible with macOS Sequoia</h3>
<h3>MonitorControl</h3>
<p>Controls your external display brightness and volume and shows native OSD.
Use menubar extra sliders or the keyboard, including native Apple keys!</p>
<a href="https://github.com/MonitorControl/MonitorControl/releases"><img src=".github/macos_badge_noborder.png" width="175" alt="Download for macOS"/></a>
@ -24,11 +24,14 @@ Use menubar extra sliders or the keyboard, including native Apple keys!</p>
<hr>
> [!WARNING]
> MonitorControl v4.2.0 [may crash](https://github.com/MonitorControl/MonitorControl/issues/1663) on certain configurations running macOS 15 Sequoia or Tahoe. Additionally, this version will not automatically update to the [latest app version](https://github.com/MonitorControl/MonitorControl/releases). To resolve the issue and ensure future updates, please upgrade manually.
## Download
Go to [Releases](https://github.com/MonitorControl/MonitorControl/releases) and download the latest `.dmg`, or you can install via Homebrew:
```shell
brew install MonitorControl
brew install --cask monitorcontrol
```
## Major features
@ -44,7 +47,7 @@ brew install MonitorControl
- Support for custom keyboard shortcuts as well as standard brightness and media keys on Apple keyboards.
- Dozens of customization options to tweak the inner workings of the app to suit your hardware and needs (don't forget to enable `Show advanced settings` in app Settings).
- Simple, unobtrusive UI to blend in to the general aesthetics of macOS.
- **One of the best app of its kind, completely FREE.**
- Completely FREE.
For additional features, more advanced brightness control with XDR/HDR brightness upscaling and support for more Mac models and displays, check out [BetterDisplay](https://github.com/waydabber/BetterDisplay#readme)!
@ -78,7 +81,9 @@ For additional features, more advanced brightness control with XDR/HDR brightnes
_* With some limitations - full functionality available on macOS 11 Big Sur or newer._
For macOS Sequoia compatibility [v4.3.2 or newer](https://github.com/MonitorControl/MonitorControl/releases) is required!
For macOS Sequoia and Tahoe 26 compatibility [v4.3.3 or newer](https://github.com/MonitorControl/MonitorControl/releases) is required!
Please note that current versions have limited native macOS OSD support on macOS Tahoe - although the Control Center brightness or volume OSD appears, the OSD percentage value will not show or update.
### Supported displays
@ -93,17 +98,10 @@ Notable exceptions for hardware control compatibility:
- Some displays (notably EIZO) use MCCS over USB or an entirely custom protocol for control. These displays are supported with software dimming only.
- DisplayLink docks and dongles do not allow for DDC control on Macs, only software dimming is available for these connections.
Compatibility with
- f.lux users: please activate `Avoid gamma table manipulation` under `Settings` » `Displays`! This step is not needed if you use Night Shift.
- [BetterDisplay](https://betterdisplay.pro/) users: either activate `Avoid gamma table manipulation` in MonitorControl or turn off `Allow color table adjustments` in BetterDisplay (under Settings/Displays/Overview). You might want to disable native keyboard control either in MonitorControl or BetterDisplay, depending on which app you want to use for brightness control and dimming.
## Contributing to the project
- You can help out [by contributiong to the project with your one-time donation or by being a regular Sponsor](https://opencollective.com/monitorcontrol)!
- If you want, you can fork the code, make improvements and submit a pull request to improve the app. Accepting a PR is solely in the hands of the maintainer - before making fundamental changes expecting it to be accepted, please consult the maintainer of the project!
## How to build
### Required
@ -132,17 +130,12 @@ git clone https://github.com/MonitorControl/MonitorControl.git
- [KeyboardShortcuts](https://github.com/sindresorhus/KeyboardShortcuts)
- [Sparkle](https://github.com/sparkle-project/Sparkle)
## Hall of Honor
## Credits
### Current maintainer of the project
- [@waydabber](https://github.com/waydabber), developer of [BetterDisplay](https://github.com/waydabber/BetterDisplay#readme).
### Former maintainers, special contributors
- [@the0neyouseek](https://github.com/the0neyouseek) - previous (now honorary) maintainer
- [@JoniVR](https://github.com/JoniVR) - previous (now honorary) maintainer
- [@alin23](https://github.com/alin23) (generally spearheaded M1 DDC support and figured out a many of the caveats)
- [@waydabber](https://github.com/waydabber), maintainer, developer of [BetterDisplay](https://github.com/waydabber/BetterDisplay#readme).
- [@the0neyouseek](https://github.com/the0neyouseek) - honorary maintainer
- [@JoniVR](https://github.com/JoniVR) - honorary maintainer
- [@alin23](https://github.com/alin23) - spearheaded M1 DDC support, developer of [Lunar](https://lunar.fyi)
- [@mathew-kurian](https://github.com/mathew-kurian/) (original developer)
- [@Tyilo](https://github.com/Tyilo/) (fork)
- [@Bensge](https://github.com/Bensge/) - (used some code from his project [NativeDisplayBrightness](https://github.com/Bensge/NativeDisplayBrightness))