Can you please help us with the scenario below, including details and Apple’s recommendations?
I've already read through the Notarization and Gatekeeper documentation.
The installed version of our application is 1.2.3, located in /Applications/XYZSecurity.app.
We created an upgrade package for version 1.2.4. As part of the pre-install script in the 1.2.4 installer, we explicitly deleted some obsolete .dylib files from /Applications/XYZSecurity.app/Contents/Frameworks and some executable files from
/Applications/XYZSecurity.app/Contents/MacOS that were no longer needed in version 1.2.4.
The installation of version 1.2.4 completed successfully, but we see the below error logs in installer.log:
PackageKit: Failed to unlinkat file reference /Applications/XYZSecurity.app/Contents/Frameworks/libhelper.dylib
PackageKit: Failed to unlinkat file reference /Applications/XYZSecurity.app/Contents/MacOS/helper-tool
Our Key Questions:
Is it the right practice to remove obsolete files in the pre-install script during an upgrade?
Is this approach recommended by Apple?
Can this cause any issues with Apple Gatekeeper? Is there a possibility of my application getting blocked by Gatekeeper as a result?
Posts under macOS tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
This concerns file provider framework on macOS.
Some users of our application (Egnyte.app) report that they have problems downloading dataless files.
When a file reaches invalid state, trying to open or download it through Finder results in "Invalid argument" alert (see example-recording.mp4).
At the same time our FileProvider extension receives no fetchContents or fetchPartialContents calls.
A step-by-step set of instructions to reproduce the problem (if possible)
So far we don't have clear reproduction steps.
The issue is easily reproducible, for multiple files, for some of our customers.
See attached sysdiagnose and recording.
What results you expected
Our extension receives a request to download the file.
File downloads and opens successfully.
What results you actually saw
No download request made to our File Provider extension.
File doesn't open, Finder alert instead.
PLEASE NOTE:
Before recording and collecting sysdiagnose we installed FileProvider.mobileconfig, slightly modified official profile that we attach.
Example reproduction happens 8:33 into full-recording.mp4, around 17:01:18 / 17:01:19 machine’s time.
Shared sysdiagnose and recordings come from one of our customers, they permitted us to share the data.
In the recording they try to open files with multiple 3rd party applications (Vectorworx, Office PowerPoint) and those opens fail with alerts from those applications. We have similar reports from customers using Adobe apps.
More info in FB19462434
In the past I was always able to install every major macOS version on an external drive so that I can test my apps. But now I'm unable to install macOS Tahoe 26 on an external drive. Actually, as far as I'm aware, there are not even official links to macOS 26 installers, but only instructions on how to update to macOS 26 from an existing macOS installation. So I thought I'd install macOS 15 on a separate drive and then update to macOS 26, but whenever I run the macOS 15 installer, tell it to install on the external drive, and reboot after the setup process completes, my MacBook just boots into my main macOS partition as if nothing happened.
3 months ago I somehow managed to install macOS Tahoe beta 1 on an external drive, I don't remember how (but I don't think it was anything crazy); booting into that beta 1 partition and trying to update doesn't work either, as my MacBook again boots into my main macOS partition. I already asked help about the update problem one month ago here, but nobody replied.
Could someone at Apple please provide instructions on how one is supposed to install macOS 26 on an external drive (if possible before it becomes available to the public)? Are we supposed to buy a separate Mac for every macOS version that we want to test our apps on?
This concerns file provider framework on macOS.
Some users of our application (Egnyte.app) report that they have problems downloading dataless files.
When a file reaches invalid state, trying to open or download it through Finder results in "Invalid argument" alert (see example-recording.mp4).
At the same time our FileProvider extension receives no fetchContents or fetchPartialContents calls.
A step-by-step set of instructions to reproduce the problem (if possible)
So far we don't have clear reproduction steps.
The issue is easily reproducible, for multiple files, for some of our customers.
See attached sysdiagnose and recording.
What results you expected
Our extension receives a request to download the file.
File downloads and opens successfully.
What results you actually saw
No download request made to our File Provider extension.
File doesn't open, Finder alert instead.
PLEASE NOTE:
Before recording and collecting sysdiagnose we installed FileProvider.mobileconfig, slightly modified official profile that we attach.
Example reproduction happens 8:33 into full-recording.mp4, around 17:01:18 / 17:01:19 machine’s time.
Shared sysdiagnose and recordings come from one of our customers, they permitted us to share the data.
In the recording they try to open files with multiple 3rd party applications (Vectorworx, Office PowerPoint) and those opens fail with alerts from those applications. We have similar reports from customers using Adobe apps.
An open-source app that I bundle for macOS needs to use the disable-library-validation entitlement. In spite of TN3125: Inside Code Signing: Provisioning Profiles | Apple Developer Documentation#Entitlements-on-macOS
claiming that hardened runtime entitlements don't need provisioning profiles and the app successfully notarizing, trying to run the app fails with the error "Disallowing because no eligible provisioning profiles found".
So I created a provisioning profile, but when creating the App ID the only selection that seemed relevant was Hardened Runtime. That turns out not to include disable-library-validation so now launching fails with "Unsatisfied entitlements: >com.apple.security.cs.disable-library-validation"
What's the right capability?
Hi all,
I’ve built an Electron application that uses two child processes:
An Express.js server
A Python executable (packaged .exe/binary)
During the development phase, everything works fine — the Electron app launches, both child processes start, and the app functions as expected.
But when I create a production build for macOS, the child processes don’t run.
Here’s a simplified snippet from my electron.mjs:
import { app, BrowserWindow } from "electron";
import { spawn } from "child_process";
import path from "path";
let mainWindow;
const createWindow = () => {
mainWindow = new BrowserWindow({
width: 1200,
height: 800,
webPreferences: {
nodeIntegration: true,
},
});
mainWindow.loadFile("index.html");
// Start Express server
const serverPath = path.join(process.resourcesPath, "app.asar.unpacked", "server", "index.js");
const serverProcess = spawn(process.execPath, [serverPath], {
stdio: "inherit",
});
// Start Python process
const pythonPath = path.join(process.resourcesPath, "app.asar.unpacked", "python", "myapp");
const pythonProcess = spawn(pythonPath, [], {
stdio: "inherit",
});
serverProcess.on("error", (err) => console.error("Server process error:", err));
pythonProcess.on("error", (err) => console.error("Python process error:", err));
};
app.whenReady().then(createWindow);
I’ve already done the following:
Configured package.json with the right build settings
Set up extraResources / asarUnpack to include the server and Python files
Verified both child processes work standalone
Questions:
What’s the correct way to package and spawn these child processes for macOS production builds?
Do I need to move them into a specific location (like Contents/Resources/app.asar.unpacked) and reference them differently?
Is there a more reliable pattern for handling Express + Python child processes inside an Electron app bundle?
Any insights or working examples would be really appreciated!
Hi 🙋
Has anybody gotten subtitles in macOS Tahoe Control Widgets to show up in their custom control widgets? Seems macOS is able to do it (see attached screenshot of the Bluetooth control widget), but my widget, which shows a title and subtitle on iOS, will only show the title on macOS.
I tried all the different ControlWidgetButton init methods to no avail. I tried a VStack for my title and subtitle Texts, I tried just two Texts without a VStack, I tried the controlWidgetStatus and controlWidgetActionHint modifiers out of desperation... nothing worked.
Any pointers much appreciated!
Thank you,
– Matthias
3
I am working on an application to get when input audio device is being used. Basically I want to know the application using the microphone (built-in or external)
This app runs on macOS. For Mac versions starting from Sonoma I can use this code:
int getAudioProcessPID(AudioObjectID process)
{
pid_t pid;
if (@available(macOS 14.0, *)) {
constexpr AudioObjectPropertyAddress prop {
kAudioProcessPropertyPID,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMain
};
UInt32 dataSize = sizeof(pid);
OSStatus error = AudioObjectGetPropertyData(process, &prop, 0, nullptr, &dataSize, &pid);
if (error != noErr) {
return -1;
}
} else {
// Pre sonoma code goes here
}
return pid;
}
which works.
However, kAudioProcessPropertyPID was added in macOS SDK 14.0.
Does anyone know how to achieve the same functionality on previous versions?
If I use the new beta Icon Composer to make a .icon file for a macOS app, will it work for any macOS versions before 26? If not, can one build with both the .icon and the older asset collection icon?
I am trying to send an anonymous XPC listener endpoint to my daemon from user context in order to be able to do some bidirectional XPC.
I was trying to use the new XPCListener and XPCSession objects and the easiest method I figured was using the Codable version of the send() methods, in which I wanted to send the XPCEndpoint object - alongside the name of the anonymous endpoint (because I want to have more XPCEndpoints sent over, so I want to be able to identify them.
However, trying to manually encode XPCEndpoint throws an exception:
ERROR: Missing CodingUserInfoKey CodingUserInfoKey(rawValue: "_XPCCodable")
Here is a simple command-line tool reproducing the issue:
import Foundation
import XPC
let listener = try XPCListener(service: "mach-service.xxx.yyy", incomingSessionHandler: {
$0.accept(incomingMessageHandler: { (msg: XPCReceivedMessage) in
return nil
})
})
var endpoint = listener.endpoint
do {
let endpointData = try JSONEncoder().encode(endpoint)
print("EndpointData object: \(endpointData.count) bytes")
} catch let error {
print("ERROR: \(error)")
}
Wrapping my object into an XPCDictionary, then adding multiple keys alongside an "endpoint" key with the XPCEndpoint as value works, but XPCDictionaries are less ideal - they don't even support vanilla Data objects, only ones converted to an xpc_object_t with xpc_data_* functions
Is this expected behavior? I shouldn't encode an XPCEndpoint myself? I am using the latest Xcode 26.0 beta, with deployment target of macOS 15.1, running on macOS 15.5.
(Btw it's also incorrect that this XPCEndpoint API is available from macOS 15.0 - it cannot be found in Xcode 15.4 under macOS 15.5. At the very best it's backDeployed but this isn't mentioned in its public declaration.)
Hi,
I need to bundle an additional binary along my yet published application.
It is a Audio Unit test application.
My yet published application implemented Audio Unit plugin support.
But upload is always rejected:
Validation failed (409)
Invalid Provisioning Profile. The provisioning profile included in the bundle com.gsequencer.GSequencer [com.gsequencer.GSequencer.pkg/Payload/com.gsequencer.GSequencer.app] is invalid. [Missing code-signing certificate.] For more information, visit the macOS Developer Portal. (ID: ****)
I have followed the instructions here: Embedding a helper tool in a sandboxed app
but no luck. Does anyone know whats going on?
I use Transporter to upload the application, the embedded.provisioningprofile is copied from Xcode build and code signing is done manually.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
macOS
Provisioning Profiles
Code Signing
Hi everyone,
I'm encountering a behaviour related to Secure Event Input on macOS and wanted to understand if it's expected or if there's a recommended approach to handle it.
Scenario:
App A enables secure input using EnableSecureEventInput().
While secure input is active, App A launches App B using NSWorkspace or similar.
App B launches successfully, but it does not receive foreground focus — it starts in the background.
The system retains focus on App A, seemingly to preserve the secure input session.
Observed Behavior:
From what I understand, macOS prevents app switching during Secure Event Input to avoid accidental or malicious focus stealing (e.g., to prevent UI spoofing during password entry). So:
Input focus remains locked to App A.
App B runs but cannot become frontmost unless the secure input session ends or App B is brought to the frontmost by manual intervention or by running a terminal script.
This is consistent with system security behaviour, but it presents a challenge when App A needs to launch and hand off control to another app.
Questions:
Is this behaviour officially documented anywhere?
Is there a recommended pattern for safely transferring focus to another app while Secure Event Input is active?
Would calling DisableSecureEventInput() just before launching App B be the appropriate (and safe) solution? Or is there a better way to defer the transition?
Thanks in advance for any clarification or advice.
See crash details here:- https://pastebin.com/i9u5PE4X
There's a comprehensive thread here, folks!
https://discussions.apple.com/thread/255651156?sortBy=oldest_first
Thanks for any thoughts.
Hello Apple Developer Community,
We are developing a full-tunnel VPN app for macOS that utilizes a packet tunnel network system extension (via NEPacketTunnelProvider). We're committed to using a system extension for this purpose, as it aligns with our requirements for system-wide tunneling. The app is sandboxed and intended for distribution on the Mac App Store.
Here's the workflow:
The app (running in user context) downloads a VPN profile from our server.
It generates private keys, appends them to the profile, and attempts to save this enhanced profile securely in the keychain.
The packet tunnel system extension (running in root context) needs to access this profile, including the private keys, to establish the VPN connection.
We've encountered challenges in securely sharing this data across the user-root boundary due to sandbox restrictions and keychain access limitations. Here's what we've tried so far, along with the issues:
Writing from the App to the System Keychain:
Attempted to store the profile in the system keychain for root access. This fails because the sandboxed app lacks permissions to write to the system keychain. (We're avoiding non-sandboxed approaches for App Store compliance.)
Extension Reading Directly from the User Login Keychain:
Tried having the extension access the user's login keychain by its path.
We manually added the network extension (located in /Library/SystemExtensions//bundle.systemextension) to the keychain item's Access Control List (ACL) via Keychain Access.app for testing.
This results in "item not found" errors, likely due to the root context not seamlessly accessing user-keychain items without additional setup.
Using Persistent References in NETunnelProviderProtocol:
The app stores the profile in the user keychain and saves a persistent reference (as Data) in the NETunnelProviderProtocol's identityReference or similar fields. The extension then attempts to retrieve the item using this reference.
We manually added the network extension (located in /Library/SystemExtensions//bundle.systemextension) to the keychain item's Access Control List (ACL) via Keychain Access.app for testing.
However, this leads to error -25308 (errSecInteractionNotAllowed) when the extension tries to access it, possibly because of the root-user context mismatch or interaction requirements.
Programmatically Adding the Extension to the ACL:
Explored using SecAccess and SecACL APIs to add the extension as a trusted application. This requires SecTrustedApplicationCreateFromPath to create a SecTrustedApplicationRef from the extension's path.
Issue 1: The sandboxed app can't reliably obtain the installed extension's path (e.g., via scanning /Library/SystemExtensions or systemextensionsctl), as sandbox restrictions block access.
Issue 2: SecTrustedApplicationCreateFromPath is deprecated since macOS 10.15, and we're hesitant to rely on it for future compatibility.
We've reviewed documentation on keychain sharing, access groups (including com.apple.managed.vpn.shared, but we're not using managed profiles/MDM) as the profiles are download from a server, and alternatives like XPC for on-demand communication, but we're unsure if XPC is suitable for sensitive data like private keys during tunnel creation. And if this is recommended what is going to be the approach here.
What is the recommended, modern approach for this scenario? Is there a non-deprecated way to handle ACLs or share persistent references across contexts? Should we pursue a special entitlement for a custom access group, or is there a better pattern using NetworkExtension APIs?
Any insights, code snippets, or references to similar implementations would be greatly appreciated. We're targeting macOS 15+.
Thanks in advance!
I mean…I want to use defaults rather than launching apps via open with the saved environment variables.
This is pretty easy on iOS and other platforms. So what about in macOS?
I've gotten to the point where I can use the mount(8) command line tool and the -t option to mount a file system using my FSKit file system extension, in which case I can see a process for my extension launch, probe, and perform the other necessary actions.
However, when plugging in my USB flash drive or trying to mount with diskutil mount, the file system does not mount:
$ diskutil mount disk20s3
Volume on disk20s3 failed to mount
If you think the volume is supported but damaged, try the "readOnly" option
$ diskutil mount readOnly disk20s3
Volume on disk20s3 failed to mount
If you think the volume is supported but damaged, try the "readOnly" option
Initially I thought it would be enough to just implement probeExtension(resource:replyHandler:) and the system would handle the rest, but this doesn't seem to be the case. Even a trivial implementation that always returns .usable doesn't cause the system to use my FSModule, even though I've enabled my extension in System Settings > General > Login Items & Extensions > File System Extensions.
From looking at some of the open source msdos and Disk Arb code, it seems like my app extension needs to list FSMediaTypes to probe. I eventually tried putting this in my Info.plist of the app extension:
<key>FSMediaTypes</key>
<dict>
<key>EBD0A0A2-B9E5-4433-87C0-68B6B72699C7</key>
<dict>
<key>FSMediaProperties</key>
<dict>
<key>Content Hint</key>
<string>EBD0A0A2-B9E5-4433-87C0-68B6B72699C7</string>
<key>Leaf</key>
<true/>
</dict>
</dict>
<key>0FC63DAF-8483-4772-8E79-3D69D8477DE4</key>
<dict>
<key>FSMediaProperties</key>
<dict>
<key>Content Hint</key>
<string>0FC63DAF-8483-4772-8E79-3D69D8477DE4</string>
<key>Leaf</key>
<true/>
</dict>
</dict>
<key>Whole</key>
<dict>
<key>FSMediaProperties</key>
<dict>
<key>Leaf</key>
<true/>
<key>Whole</key>
<true/>
</dict>
</dict>
<key>ext4</key>
<dict>
<key>FSMediaProperties</key>
<dict>
<key>Content Hint</key>
<string>ext4</string>
<key>Leaf</key>
<true/>
</dict>
</dict>
</dict>
</plist>
(For reference, the partition represented by disk20s3 has a Content Hint of 0FC63DAF-8483-4772-8E79-3D69D8477DE4 and Leaf is True which I verified using IORegistryExplorer.app from the Xcode additional tools.)
Looking in Console it does appear now that the system is trying to use my module (ExtendFS_fskit) to probe when I plug in my USB drive, but I never see a process for my extension actually launch when trying to attach to it from Xcode by name (unlike when I use mount(8), where I can do this). However I do see a Can't find the extension for <private> error which I'm not sure is related but does sound like the system can't find the extension for some reason.
The below messages are when filtering for "FSKit":
default 19:14:53.455826-0400 diskarbitrationd probed disk, id = /dev/disk20s3, with ExtendFS_fskit, ongoing.
default 19:14:53.456038-0400 fskitd Incomming connection, entitled 1
default 19:14:53.456064-0400 fskitd [0x7d4172e40] activating connection: mach=false listener=false peer=true name=com.apple.filesystems.fskitd.peer[350].0x7d4172e40
default 19:14:53.456123-0400 fskitd Hello FSClient! entitlement yes
default 19:14:53.455902-0400 diskarbitrationd [0x7461d8dc0] activating connection: mach=true listener=false peer=false name=com.apple.filesystems.fskitd
default 19:14:53.456151-0400 diskarbitrationd Setting remote protocol to all XPC
default 19:14:53.456398-0400 fskitd About to get current agent for 501
default 19:14:53.457185-0400 diskarbitrationd probed disk, id = /dev/disk20s3, with ExtendFS_fskit, failure.
error 19:14:53.456963-0400 fskitd -[fskitdXPCServer applyResource:targetBundle:instanceID:initiatorAuditToken:authorizingAuditToken:isProbe:usingBlock:]: Can't find the extension for <private>
(I only see these messages after plugging my USB drive in. When running diskutil mount, I see no messages in the console when filtering by FSKit, diskarbitrationd, or ExtendFS afterward. It just fails.)
Is there a step I'm missing to get this to work, or would this be an FSKit bug/current limitation?
In SwiftUI for macOS, when implementing a DragGesture inside a ScrollVIew, how can I implement auto-scrolling when the mouse is not actively moving?
In AppKit, this would normally be done with a periodic event so that auto-scrolling continues to take place even if the user isn't actively moving the mouse. This is essential behaviour when implementing something like a drag-to-select gesture.
NSView.autoscroll(with: NSEvent) -> Bool
Is there anything in SwiftUI or ScrollView to accomplish this behaviour?
If you create a NavigationSplitView, then the sidebar is automatically adorned with a sidebar material effect. This affects the views background as well as any controls that are in the view.
What is the correct way to disable this behaviour so that I can use a NavigationSplitView without the material effects being applied?
The best I've come up with so far is to explicitly set the background on the sidebar but I'm curious if that's the correct way or I'm just getting lucky.
struct ContentView: View {
var body: some View {
NavigationSplitView {
// This works, but is it correct?
SidebarView()
.background(.windowBackground)
} detail: {
DetailView()
}
}
}
Any time I attempt to download the latest beta of macOS 26, Safari stops the download at Zero KB, with no indication of why.
I'm able to download OS 26 beta 8 for the other platforms absolutely fine, just not macOS. Pressing the little orange "reload" button, just results in another copy of the same zero KB file bundle on the file system.
Can anyone help please?
I have a standard Mac project created using Xcode templates with Storyboard. I manually removed the window from the Storyboard file and use ViewController.h as the base class for other ViewControllers. I create new windows and ViewControllers programmatically, implementing the UI entirely through code.
However, I've discovered that on all macOS versions prior to macOS 26 beta, the application would trigger automatic termination due to App Nap under certain circumstances. The specific steps are:
Close the application window (the application doesn't exit immediately at this point)
Click on other windows or the desktop, causing the application to lose focus (though this description might not be entirely accurate - the app might have already lost focus when the window closed, but the top menu bar still shows the current application immediately after window closure)
The application automatically terminates
In previous versions, I worked around this issue by manually executing [[NSApplication sharedApplication] run]; to create an additional main event loop, keeping the application active (although I understand this isn't an ideal approach).
However, in macOS 26 beta, I've found that calling [[NSApplication sharedApplication] run]; causes all NSButton controls I created in the window to become unresponsive to click events, though they still respond to mouse enter events.
Through recent research, I've learned that the best practice for preventing App Nap automatic termination is to use [[NSProcessInfo processInfo] disableAutomaticTermination:@"User interaction required"]; to increment the automatic termination reference count.
My questions are:
Why did calling [[NSApplication sharedApplication] run]; work properly on macOS versions prior to 15.6.1?
Why does calling [[NSApplication sharedApplication] run]; in macOS 26 beta cause buttons to become unresponsive to click events?