Preference Panes

RSS for tag

Integrate your app's custom preferences into the System Preferences app using Preference Panes.

Posts under Preference Panes tag

6 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Can't NSUserDefaults be used between container apps and system extensions?
Hi, I try to use NSUserDefaults to share some parameter values ​​between the container app and the system extension. I have added the App Group in Signing & Capabilities in both apps. I set it in the container app and read it in the system extension app, but the information I read from the system extension is nil. I tested that I can read the information directly from the container app. Is the system extension running in the sandbox not allowed to read other app information? But the information I see should be OK, as shown below: The container app code is as follows: NSUserDefaults *sharedDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.yourcompany.shared"]; [sharedDefaults setObject:@"Sample Data" forKey:@"SharedData"]; [sharedDefaults synchronize]; The system expansion reading code is as follows: NSUserDefaults *sharedDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.yourcompany.shared"]; NSString *data = [sharedDefaults objectForKey:@"SharedData"]; os_log_debug(logHandle, "NSUserDefaults: %{public}@", data);
1
0
108
1w
link to open endpoint security extensions via swiftUI
Hi Team, In previous macOS version, We were using this link to open system extension permission page programmatically for our swift app. x-apple.systempreferences:com.apple.preference.security?General In macos 15 (Sequoia), this pane is moved to system settings-> general->login Items and extensions->end point security extensions which is a modal/popup. Can you please share what should be link to open exact this popup for asking permissions.It appears when you click on i button against end point security extensions Based on apple script I could find following link but it opens login item & extensions pane, I want the next popup as above screenshot. "x-apple.systempreferences:com.apple.LoginItems-Settings.extension?extensionItems™
1
0
261
Sep ’24
Including a prefpane in App bundle?
Somewhere in the back of my head, I seem to remember that we can include prefPanes in our app store distributed apps these days (much like we can now include driverkit extensions). I can't for the life of me find this in the documentation again though. Can we do this? Or do I need to copy it from my app bundle to ~/Library/PreferencePanes? Thanks!
3
0
486
Jun ’24
Changing Accessibility Settings from Within a Script
Hello, Recently, I've been hacking at trying to find a way for the colors of the system cursor to be changed via an executable (in particular, I'm trying to get them to match the foreground/background colors chosen by wal.) In my most recent investigation, I've located the relevant setting in ~/Library/Preferences/com.apple.universalaccess (which is a wierd place for it to be, but w/e) and attempted to change it via defaults write. This immediately caused all my GUI apps including Finder to crash repeatedly until I went into recovery mode and deleted the changed file. My next direction in this quandary, then, is to make an application that asks for the relevant Accessibility settings (via the standard prompt that I often see) and upon being granted proper permission, is able to make the modifications without breaking the system. Is anyone able to point me towards the documentation for such functionality, if it's possible? Preferably some kind of C or shell interface.
0
0
487
Apr ’24
add app preferences into the visionOS Settings app
Hello everyone, I am currently developing an application for visionOS and would like to integrate my app's preferences into the Settings app. This will allow users to easily access and modify settings specific to my application directly from the system settings interface. I have done this in iOS using Settings.bundle but unfortunately it is not available in visionOS applications. Does anyone know how to achieve this integration? I would greatly appreciate any resources, examples, or tutorials that you can provide to help me with this task. Thank you in advance for your assistance.
0
0
478
Feb ’24
Opening the Extension menu in the System Preferences
Hi there, I have two extension in my App, a Finder Sync and a Share Extension. Because these are disabled by default and automatically enabling them is, according to my extensive research, not possible, I want to provide an easy way for the user to enable the extensions when the app is opened. I am currently displaying a popup, with a button to open the preferences. I have struggled with this a bit, by now I managed to open the main preferences window using NSWorkspace.shared.open(URL(string: "x-apple.systempreferences:com.apple.preference")!) which is rather suboptimal though, since the user has to select the extensions option manually and isn't directly redirected there. What I have also found is that the menu of the FinderSyncExtension can be opened directly by using FIFinderSyncController.showExtensionManagementInterface() which is unfortunately suboptimal as well, because it only shows the managment interface of the finder extension and not the overview of all extensions. Is there any way to either enable the extensions programatically, or if not, is there a way to show the "Added Extensions" portion of the Extensions menu in the system preferences?
7
1
3.7k
Sep ’24