Post

Replies

Boosts

Views

Activity

Shortcut run from the share sheet never returns its output to the host app
My app presents UIActivityViewController with a string and reads returnedItems in completionWithItemsHandler, so the user can transform text with an action. This works with third-party action extensions that call completeRequest(returningItems:). Shortcuts with "Show in Share Sheet" enabled appear in the same list and receive the text as input, but I never get anything back. With a shortcut that is just Receive input from Share Sheet Change Case: Change Shortcut Input to UPPERCASE Stop and Output: Updated Text the handler is called like this: activityType=com.apple.shortcuts.Run-Workflow.(null) completed=NO error=nil returnedItems=0while my own action extension doing the same thing gives: activityType=com.example.ShareSheetReturn.UppercaseControl completed=YES error=nil returnedItems=1 attachmentTypes=[public.plain-text]The shortcut does run and computes the right result. The Shortcuts logs for the run show the request being created with "output behavior: Ignore" and the run ending with no output: request: <WFWorkflowRunRequest: 0x109a63d40, runSource: action_extension, input: yes, presentationMode: Persistent, output behavior: Ignore, ...> Action <WFHandleCustomIntentAction: 0x1019d4620, identifier: is.workflow.actions.text.changecase> finished with output of 1 items and first item: <WFStringContentItem: 0x107958690>: HELLO SHORTCUTS Shortcut <WFWorkflow: 0x1019d3900, name: Change Case, actions: 2> has finished running with output: (null).Previous versions of Shortcuts did pass the result back through the share sheet, so this looks like a regression. Tested on the iOS 27.3 simulator with Xcode 27.3 beta. Is there any way for a shortcut run from the share sheet to hand its output back to the presenting app, or any configuration of the shortcut that makes this work? If not, I would like the output of "Stop and Output" to be returned as NSExtensionItems again. Filed as FB25701248 with a minimal sample project (a text view, a button and a control action extension).
0
0
70
1d
Removing File Provider domains when a Mac App Store app is deleted
My Mac App Store apps use NSFileProviderReplicatedExtension, and users keep asking how to remove the folder in ~/Library/CloudStorage after deleting the app. Deleting the app leaves the domain registered and the folder in place. fileproviderctl dump shows the domain as "extension not found", and on my own Mac one such domain had survived for five months. As far as I can tell there is no supported way for the developer to clean this up: A sandboxed Mac App Store app cannot run code when it is deleted. NSFileProviderManager.remove(_:mode:) and removeAllDomains only work while the app is installed. fileproviderctl has no command to remove a domain. invalidate() is called when the extension is turned off in System Settings, but also on routine teardown, so it cannot drive cleanup. The one way out I have found is manual. Open the leftover folder in Finder, which says "The application "X" could not be found", and click Delete "X"… in the upper right corner. That removes both the domain and the folder, but users rarely find it on their own. Is there a mechanism I have missed, such as an Info.plist key or a system behavior, that removes a deleted app's domains automatically? If not, the best I can do seems to be an in-app "Remove from Finder" command that users have to run before deleting the app. I have filed FB25610224 asking for the system to remove a deleted app's domains, keeping unsynced changes the way .preserveDirtyUserData does.
1
0
83
1w
Choosing a TLS server identity by client address with NWListener
I run an HTTPS server on NWListener (iOS and macOS) that serves several identities from one listener on port 443, picked per handshake in sec_protocol_options_set_challenge_block, as suggested in this thread. That works well for every handshake that carries a server name. The trouble is handshakes without one. Clients on the LAN connect by IP address, so they send no SNI (RFC 6066 keeps IP literals out of it), and they trust a self-signed certificate through a configuration profile. Internet clients and scanners that reach the public address through the router's port forward also often arrive without SNI. The two groups should get different certificates, and the only thing that tells them apart is the client's address. The listener knows it in newConnectionHandler, but the challenge block never sees it. What I tried: sec_protocol_metadata_t has accessors for the server name, ALPN, version, cipher suite and so on, but I can't find one for the connection's endpoints. Setting a challenge block on the accepted connection's own TLS options before start(): listener.newConnectionHandler = { connection in let remote = connection.endpoint if let tls = connection.parameters.defaultProtocolStack.applicationProtocols .compactMap({ $0 as? NWProtocolTLS.Options }).first { sec_protocol_options_set_challenge_block(tls.securityProtocolOptions, { _, complete in complete(identity(for: remote)) }, queue) } connection.start(queue: queue) }This block never runs. The listener's own block answers every handshake (tested on macOS 27.2). My questions: Is there a supported way to choose the server identity per connection based on its endpoints, short of terminating TLS myself? Is the challenge block supported under TLS 1.3 by now? I also see it run twice for every handshake; is that expected? When a server-side handshake fails, connection.metadata(definition: NWProtocolTLS.definition) returns nil. Is there any way to learn which server name a failed handshake asked for, so it can be logged? I filed FB25541009 with a small sample project that shows all three.
2
0
100
1w
Siri AI tools: how do I make an App Intent available to Siri but not listed in Shortcuts?
With the Siri AI Developer Preview in iOS 27.3 beta 1, we are exposing custom intents to Siri as tools with @AppIntent(.tool). Some of these only make sense for Siri, for example a read-only status tool whose result Siri phrases as an answer, or variants that would duplicate existing Shortcuts actions. Our app already has a long list of Shortcuts actions, so we would like these tools to be available to Siri AI without appearing as actions in the Shortcuts app. @available(iOS 27.3, *) @AppIntent(.tool) struct GetStatusIntent: AppIntent { static let title: LocalizedStringResource = "Get Status" @Parameter(title: "Item") var item: ItemEntity func perform() async throws -> some IntentResult & ReturnsValue<StatusEntity> { // ... } }What we have tried on iOS 27.3 beta 1: static let isDiscoverable = false hides the action from Shortcuts, but Siri then never called the tool and used a different one instead. Conforming to DeprecatedAppIntent while keeping it discoverable also hides the action, but Siri stopped calling the tool over repeated attempts. Removing the deprecation brought it straight back. isAssistantOnly would describe what we want, but it only exists on AssistantSchemaIntent, and combining .tool with a Siri-supported schema is a build error. ToolIntent itself has no requirements in the 27.3 SDK. IntentVisibility only applies to entity properties, and .internal hides the property from Siri as well. Questions: Is there a supported way to make an intent available to Siri AI while keeping it out of the Shortcuts action list? Is it intended that isDiscoverable = false and DeprecatedAppIntent also make a tool unavailable to Siri AI? If there is no such option today, is one planned, and is there a feedback number we should reference? Related question about schema intents: https://developer.apple.com/forums/thread/838658 Thanks!
1
9
243
2w
File Provider extension can't reach local network hosts on macOS 27, containing app can
On macOS 27 the File Provider extension of our app (Secure ShellFish, an SSH client) can't connect to any host on the local network, while the containing app connects to the same host on the same Mac without problems. Local Network is enabled for the app in System Settings, but every connection from the extension fails with "Local network prohibited". It did not happen on macOS 26 and still happens on macOS 27.2 (26B123). This is hitting end users of Secure ShellFish, not just my test setup, and it has been my number one support issue since macOS 27 was released. I filed this as FB24999927 with a sysdiagnose. I'm posting here to find out whether others with File Provider (or other) extensions see the same, and whether there is anything on our side that should make it work. Steps Install the app on a clean macOS 27 system and launch it. Choose Allow at the Local Network prompt. Add an SSH server on the local network (another Mac in my test) and open a terminal to it. This works. Open the same server in Finder (the File Provider domain under ~/Library/CloudStorage). The directory listing fails. What happens TN3179 says "In general, app extensions share the Local Network privilege state of their container app", so I expected the listing to load. Instead every connection from the extension to the LAN host is blocked, and the error depends on the networking API: CFStream: ENETDOWN (50) "Network is down" BSD socket connect(): EHOSTUNREACH (65) "No route to host" Network.framework (NWConnection, multipath TCP): waits with path unsatisfied (Local network prohibited) until our connect timeout, ETIMEDOUT (60) No Local Network prompt appears. Toggling the permission, rebooting, killing the extension process and reinstalling the app don't help. What I ruled out A stale extension process: freshly launched extension processes are blocked on their very first connection. A missing UUID cache: after installing a new build, nehelper populates the cache for the app with 14 UUIDs, including both slices of the extension's executable. The extension was blocked 23 seconds later. Shared executable UUIDs: the app and the extension have distinct Mach-O UUIDs. The sandbox: the extension has com.apple.security.network.client. A missing usage string: adding NSLocalNetworkUsageDescription to the extension's Info.plist changed nothing, with no prompt and no separate entry in System Settings. Networking in general: the extension reaches internet hosts and the Mac itself by its local name. Only other hosts on the local network are blocked. Log The blocked notification arrives with bundle_id: (null). UserEventAgent then maps the extension to the app by its UUID, nehelper answers that local network is allowed by preference, and the handler is called with the newly allowed state. Later connections from the same process are still blocked, so that state never takes effect for the extension. 09:19:37.575 UserEventAgent Got local network blocked notification: pid: 4297, uuid: 183484C2-8052-36AD-A81E-B02F15F875B3, bundle_id: (null) 09:19:37.575 UserEventAgent LocalNetwork: found bundle id com.appliedphasor.secure-shellfish.mac-provider by PID 09:19:37.575 ShellFish-Finder [C1.1.1 IPv6#dace0833.22 failed path (unsatisfied (Local network prohibited), interface: en0[802.11], ipv4, ipv6, uses wifi)] 09:19:37.576 UserEventAgent LocalNetwork: found bundle id com.appliedphasor.secure-shellfish by UUID 183484C2-8052-36AD-A81E-B02F15F875B3 09:19:37.597 nehelper UUID cache hit for com.appliedphasor.secure-shellfish 09:19:37.597 nehelper Local network allowed by preference for ShellFish (com.appliedphasor.secure-shellfish) 09:19:37.597 UserEventAgent App got response: 1 09:19:37.597 UserEventAgent Calling handler with newly allowed state: 1 09:19:44.795 fileproviderd populate-directory error: FP -1004 "Unable to list p5.local: Unable To Connect To P5.Local: Network Is Down."Questions Is this a known change in macOS 27? FB24035385 (helper and child processes no longer inherit Local Network access on macOS 27) sounds related, and other File Provider apps report the same, for example nextcloud/desktop#10885: https://github.com/nextcloud/desktop/issues/10885 Does an extension need anything on macOS 27 to share its container's Local Network privilege, such as an entitlement, an Info.plist key, or something the app must do first? If not, is there a supported workaround? The only one we see is to relay the extension's traffic through the main app over loopback, which only works while the app is running. For these users Finder integration is completely broken, because servers on the local network (Raspberry Pi, NAS, home servers) are the most common setup among them. Any pointers are much appreciated.
2
8
430
2w
2nd deprecation of shortcuts action
My app has had shortcuts support since the Siri Intent days, so I have app intents with CustomIntentMigratedAppIntent to make sure old shortcuts continue working. Now I need to make further changes to one such shortcuts actions so I need to make a 2nd app intent to take the place of my older app intent that itself took the place of a siri intent. I need the old app intent to still exist for the sake of old shortcuts but I find that having isDiscoverable = false doesn't hide the 1st app intent so long as it has CustomIntentMigratedAppIntent. Is there any solution or do I have to either break old shortcuts or accept duplicate shortcuts actions to move my app intents forward?
1
0
150
Jun ’26
add buttons above QuickLook preview in QLPreviewingController
I'm implementing a QuickLook extension through the macOS extension point com.apple.quicklook.preview using the view-based method where I implement QLPreviewingController to show information about the previewed file url. This NSView controlled by my QLPreviewingController supports no interaction which makes sense, but I see some other QuickLook previews like for videos having toolbar button to open other apps or modify the content. How can I get similar behaviour?
1
0
1k
Nov ’24
Shortcut run from the share sheet never returns its output to the host app
My app presents UIActivityViewController with a string and reads returnedItems in completionWithItemsHandler, so the user can transform text with an action. This works with third-party action extensions that call completeRequest(returningItems:). Shortcuts with "Show in Share Sheet" enabled appear in the same list and receive the text as input, but I never get anything back. With a shortcut that is just Receive input from Share Sheet Change Case: Change Shortcut Input to UPPERCASE Stop and Output: Updated Text the handler is called like this: activityType=com.apple.shortcuts.Run-Workflow.(null) completed=NO error=nil returnedItems=0while my own action extension doing the same thing gives: activityType=com.example.ShareSheetReturn.UppercaseControl completed=YES error=nil returnedItems=1 attachmentTypes=[public.plain-text]The shortcut does run and computes the right result. The Shortcuts logs for the run show the request being created with "output behavior: Ignore" and the run ending with no output: request: <WFWorkflowRunRequest: 0x109a63d40, runSource: action_extension, input: yes, presentationMode: Persistent, output behavior: Ignore, ...> Action <WFHandleCustomIntentAction: 0x1019d4620, identifier: is.workflow.actions.text.changecase> finished with output of 1 items and first item: <WFStringContentItem: 0x107958690>: HELLO SHORTCUTS Shortcut <WFWorkflow: 0x1019d3900, name: Change Case, actions: 2> has finished running with output: (null).Previous versions of Shortcuts did pass the result back through the share sheet, so this looks like a regression. Tested on the iOS 27.3 simulator with Xcode 27.3 beta. Is there any way for a shortcut run from the share sheet to hand its output back to the presenting app, or any configuration of the shortcut that makes this work? If not, I would like the output of "Stop and Output" to be returned as NSExtensionItems again. Filed as FB25701248 with a minimal sample project (a text view, a button and a control action extension).
Replies
0
Boosts
0
Views
70
Activity
1d
Removing File Provider domains when a Mac App Store app is deleted
My Mac App Store apps use NSFileProviderReplicatedExtension, and users keep asking how to remove the folder in ~/Library/CloudStorage after deleting the app. Deleting the app leaves the domain registered and the folder in place. fileproviderctl dump shows the domain as "extension not found", and on my own Mac one such domain had survived for five months. As far as I can tell there is no supported way for the developer to clean this up: A sandboxed Mac App Store app cannot run code when it is deleted. NSFileProviderManager.remove(_:mode:) and removeAllDomains only work while the app is installed. fileproviderctl has no command to remove a domain. invalidate() is called when the extension is turned off in System Settings, but also on routine teardown, so it cannot drive cleanup. The one way out I have found is manual. Open the leftover folder in Finder, which says "The application "X" could not be found", and click Delete "X"… in the upper right corner. That removes both the domain and the folder, but users rarely find it on their own. Is there a mechanism I have missed, such as an Info.plist key or a system behavior, that removes a deleted app's domains automatically? If not, the best I can do seems to be an in-app "Remove from Finder" command that users have to run before deleting the app. I have filed FB25610224 asking for the system to remove a deleted app's domains, keeping unsynced changes the way .preserveDirtyUserData does.
Replies
1
Boosts
0
Views
83
Activity
1w
Choosing a TLS server identity by client address with NWListener
I run an HTTPS server on NWListener (iOS and macOS) that serves several identities from one listener on port 443, picked per handshake in sec_protocol_options_set_challenge_block, as suggested in this thread. That works well for every handshake that carries a server name. The trouble is handshakes without one. Clients on the LAN connect by IP address, so they send no SNI (RFC 6066 keeps IP literals out of it), and they trust a self-signed certificate through a configuration profile. Internet clients and scanners that reach the public address through the router's port forward also often arrive without SNI. The two groups should get different certificates, and the only thing that tells them apart is the client's address. The listener knows it in newConnectionHandler, but the challenge block never sees it. What I tried: sec_protocol_metadata_t has accessors for the server name, ALPN, version, cipher suite and so on, but I can't find one for the connection's endpoints. Setting a challenge block on the accepted connection's own TLS options before start(): listener.newConnectionHandler = { connection in let remote = connection.endpoint if let tls = connection.parameters.defaultProtocolStack.applicationProtocols .compactMap({ $0 as? NWProtocolTLS.Options }).first { sec_protocol_options_set_challenge_block(tls.securityProtocolOptions, { _, complete in complete(identity(for: remote)) }, queue) } connection.start(queue: queue) }This block never runs. The listener's own block answers every handshake (tested on macOS 27.2). My questions: Is there a supported way to choose the server identity per connection based on its endpoints, short of terminating TLS myself? Is the challenge block supported under TLS 1.3 by now? I also see it run twice for every handshake; is that expected? When a server-side handshake fails, connection.metadata(definition: NWProtocolTLS.definition) returns nil. Is there any way to learn which server name a failed handshake asked for, so it can be logged? I filed FB25541009 with a small sample project that shows all three.
Replies
2
Boosts
0
Views
100
Activity
1w
Siri AI tools: how do I make an App Intent available to Siri but not listed in Shortcuts?
With the Siri AI Developer Preview in iOS 27.3 beta 1, we are exposing custom intents to Siri as tools with @AppIntent(.tool). Some of these only make sense for Siri, for example a read-only status tool whose result Siri phrases as an answer, or variants that would duplicate existing Shortcuts actions. Our app already has a long list of Shortcuts actions, so we would like these tools to be available to Siri AI without appearing as actions in the Shortcuts app. @available(iOS 27.3, *) @AppIntent(.tool) struct GetStatusIntent: AppIntent { static let title: LocalizedStringResource = "Get Status" @Parameter(title: "Item") var item: ItemEntity func perform() async throws -> some IntentResult & ReturnsValue<StatusEntity> { // ... } }What we have tried on iOS 27.3 beta 1: static let isDiscoverable = false hides the action from Shortcuts, but Siri then never called the tool and used a different one instead. Conforming to DeprecatedAppIntent while keeping it discoverable also hides the action, but Siri stopped calling the tool over repeated attempts. Removing the deprecation brought it straight back. isAssistantOnly would describe what we want, but it only exists on AssistantSchemaIntent, and combining .tool with a Siri-supported schema is a build error. ToolIntent itself has no requirements in the 27.3 SDK. IntentVisibility only applies to entity properties, and .internal hides the property from Siri as well. Questions: Is there a supported way to make an intent available to Siri AI while keeping it out of the Shortcuts action list? Is it intended that isDiscoverable = false and DeprecatedAppIntent also make a tool unavailable to Siri AI? If there is no such option today, is one planned, and is there a feedback number we should reference? Related question about schema intents: https://developer.apple.com/forums/thread/838658 Thanks!
Replies
1
Boosts
9
Views
243
Activity
2w
File Provider extension can't reach local network hosts on macOS 27, containing app can
On macOS 27 the File Provider extension of our app (Secure ShellFish, an SSH client) can't connect to any host on the local network, while the containing app connects to the same host on the same Mac without problems. Local Network is enabled for the app in System Settings, but every connection from the extension fails with "Local network prohibited". It did not happen on macOS 26 and still happens on macOS 27.2 (26B123). This is hitting end users of Secure ShellFish, not just my test setup, and it has been my number one support issue since macOS 27 was released. I filed this as FB24999927 with a sysdiagnose. I'm posting here to find out whether others with File Provider (or other) extensions see the same, and whether there is anything on our side that should make it work. Steps Install the app on a clean macOS 27 system and launch it. Choose Allow at the Local Network prompt. Add an SSH server on the local network (another Mac in my test) and open a terminal to it. This works. Open the same server in Finder (the File Provider domain under ~/Library/CloudStorage). The directory listing fails. What happens TN3179 says "In general, app extensions share the Local Network privilege state of their container app", so I expected the listing to load. Instead every connection from the extension to the LAN host is blocked, and the error depends on the networking API: CFStream: ENETDOWN (50) "Network is down" BSD socket connect(): EHOSTUNREACH (65) "No route to host" Network.framework (NWConnection, multipath TCP): waits with path unsatisfied (Local network prohibited) until our connect timeout, ETIMEDOUT (60) No Local Network prompt appears. Toggling the permission, rebooting, killing the extension process and reinstalling the app don't help. What I ruled out A stale extension process: freshly launched extension processes are blocked on their very first connection. A missing UUID cache: after installing a new build, nehelper populates the cache for the app with 14 UUIDs, including both slices of the extension's executable. The extension was blocked 23 seconds later. Shared executable UUIDs: the app and the extension have distinct Mach-O UUIDs. The sandbox: the extension has com.apple.security.network.client. A missing usage string: adding NSLocalNetworkUsageDescription to the extension's Info.plist changed nothing, with no prompt and no separate entry in System Settings. Networking in general: the extension reaches internet hosts and the Mac itself by its local name. Only other hosts on the local network are blocked. Log The blocked notification arrives with bundle_id: (null). UserEventAgent then maps the extension to the app by its UUID, nehelper answers that local network is allowed by preference, and the handler is called with the newly allowed state. Later connections from the same process are still blocked, so that state never takes effect for the extension. 09:19:37.575 UserEventAgent Got local network blocked notification: pid: 4297, uuid: 183484C2-8052-36AD-A81E-B02F15F875B3, bundle_id: (null) 09:19:37.575 UserEventAgent LocalNetwork: found bundle id com.appliedphasor.secure-shellfish.mac-provider by PID 09:19:37.575 ShellFish-Finder [C1.1.1 IPv6#dace0833.22 failed path (unsatisfied (Local network prohibited), interface: en0[802.11], ipv4, ipv6, uses wifi)] 09:19:37.576 UserEventAgent LocalNetwork: found bundle id com.appliedphasor.secure-shellfish by UUID 183484C2-8052-36AD-A81E-B02F15F875B3 09:19:37.597 nehelper UUID cache hit for com.appliedphasor.secure-shellfish 09:19:37.597 nehelper Local network allowed by preference for ShellFish (com.appliedphasor.secure-shellfish) 09:19:37.597 UserEventAgent App got response: 1 09:19:37.597 UserEventAgent Calling handler with newly allowed state: 1 09:19:44.795 fileproviderd populate-directory error: FP -1004 "Unable to list p5.local: Unable To Connect To P5.Local: Network Is Down."Questions Is this a known change in macOS 27? FB24035385 (helper and child processes no longer inherit Local Network access on macOS 27) sounds related, and other File Provider apps report the same, for example nextcloud/desktop#10885: https://github.com/nextcloud/desktop/issues/10885 Does an extension need anything on macOS 27 to share its container's Local Network privilege, such as an entitlement, an Info.plist key, or something the app must do first? If not, is there a supported workaround? The only one we see is to relay the extension's traffic through the main app over loopback, which only works while the app is running. For these users Finder integration is completely broken, because servers on the local network (Raspberry Pi, NAS, home servers) are the most common setup among them. Any pointers are much appreciated.
Replies
2
Boosts
8
Views
430
Activity
2w
2nd deprecation of shortcuts action
My app has had shortcuts support since the Siri Intent days, so I have app intents with CustomIntentMigratedAppIntent to make sure old shortcuts continue working. Now I need to make further changes to one such shortcuts actions so I need to make a 2nd app intent to take the place of my older app intent that itself took the place of a siri intent. I need the old app intent to still exist for the sake of old shortcuts but I find that having isDiscoverable = false doesn't hide the 1st app intent so long as it has CustomIntentMigratedAppIntent. Is there any solution or do I have to either break old shortcuts or accept duplicate shortcuts actions to move my app intents forward?
Replies
1
Boosts
0
Views
150
Activity
Jun ’26
add buttons above QuickLook preview in QLPreviewingController
I'm implementing a QuickLook extension through the macOS extension point com.apple.quicklook.preview using the view-based method where I implement QLPreviewingController to show information about the previewed file url. This NSView controlled by my QLPreviewingController supports no interaction which makes sense, but I see some other QuickLook previews like for videos having toolbar button to open other apps or modify the content. How can I get similar behaviour?
Replies
1
Boosts
0
Views
1k
Activity
Nov ’24