Paths to open some page of System Settings
- SystemSettingsMain
- SystemSettingsGeneral
- SystemSettingsAccessibility
- SystemSettingsBattery
- SystemSettingsControlCenter
- SystemSettingsDesktopDock
- SystemSettingsDisplays
- SystemSettingsKeyboard
- SystemSettingsLockScreen
- SystemSettingsNetwork
- SystemSettingsScreenTime
- SystemSettingsSecurityPrivacy
- SystemSettingsSecurityPrivacyProfile
- SystemSettingsSharing
- SystemSettingsSiri
- SystemSettingsTouchIDPassword
- SystemSettingsWiFi
- SystemSettingsProtocol
// A protocol for interacting with system settings.
public protocol SystemSettingsProtocol: RawRepresentable where RawValue == String {
// The URL path to the system settings.
var path: URL? { get }
// Opens the system settings using the specified identifier.
//
// - Returns: true if the settings were successfully opened; otherwise, false.
func open() -> Bool
}
SystemSettingsMain.appleID.path
returns: "x-apple.systempreferences:com.apple.preferences.AppleIDPrefPane"
SystemSettingsMain.appleID.open()
Opens the Apple ID preferences
Platform | Minimum Swift Version | Installation | Status |
---|---|---|---|
macOS 13.0 | 5.8 | Swift Package Manager | Fully Tested |
macOS 14.0 | 5.9 | Swift Package Manager | Fully Tested |
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler.
Once you have your Swift package set up, adding SystemSettingsAccess as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/IGRSoft/SystemSettingsAccess.git", .upToNextMajor(from: "1.0.0"))
]
SystemSettingsAccess is released under the MIT license. See LICENSE for details.