Post

Replies

Boosts

Views

Activity

Reply to Support new Siri AI APIs while keeping backwards compatibility
There may be a better way, but this implementation cuts down on duplicate code while still supporting versions prior to macOS 27.3 import AppIntents protocol RollProtocol: AppIntent {} extension RollProtocol { func perform() async throws -> some IntentResult { return .result(value: "Test123") } } struct RollIntent: RollProtocol { // compatibility implementation } @available(macOS 27.3, *) @AppIntent(.tool) struct RollTool: RollProtocol { // Tool specific implementation }
6d
Reply to Siri AI Developer Preview — Siri never calls an app's @AppIntent(.tool) intents on macOS 27.3 beta
Hi @Alexgaillard! Here, I share some steps for the Siri AI Developer Preview, which I typically practice to ensure tools are recognized by Siri AI. Before going into that I'd like to point some findings regarding your questions. Is anything else required for Siri to consider an app's tool intents on macOS (developer setting, Spotlight indexing of entities, a minimum number of donations, a skills bundle)? Most likely, Siri AI requires your AppIntent to have the new macro @AppIntent(.tool). This is the baseline to get Siri AI recognize the intent as a tool, regardless if you'll reuse it any where else such as Shortcut or Widget. Is the preview's tool calling supported on macOS 27.3 beta in French (France) today? As per of Requirements for Siri AI you are all set for macOS but not iOS in EU. Is it expected that tool intents do not appear in the Shortcuts app? Yes, Tool intents marked with @AppIntent(.tool) are designed specifically for Siri AI's reasoning engine. Whereas, AppShortcut is used to expose intents as voice triggers or actions in the Shortcuts app. Tool intents do not necessarily appear in the Shortcuts app. It is possible to be re-used for both Siri AI and Shortcut with same AppIntent. Is there sample code for the preview that we could run first to check our environment? I believe there is a new one released this week. Integrating your messaging app with Apple Intelligence Now, to elobrate more to steps I usually do let's starts with basics. First, validate the path of the loaded intents, execute this in the Terminal: pluginkit -m -v -i com.example.intentsI encountered a situation where a different path is used than the most recent build. Specifically, this happens when an archived version (release), a DerivedData version (debug), and/or an /Application folder version are present. Second, after a successful build, the first thing I'd usually do is terminate "the old" intents via: pkill -f TARGET_NAMENOTE: If the intents in a different target than your main app, use the target name of the intents, not your main app. Third, validate the number of entities and tools of your intents via: xcrun sirimetadataanalyzer <App.app | Metadata.appintents | extract.actionsdata>Expected output: X intents (N tools), Z entitiesWhere N represents the number of tools recognized. Finally, ask Siri in a new conversation, "What tools do you have for APP_NAME?" If it responds with "based on last conversation..." ignore it; the tools are not loaded. It should respond with a list of all of your tools and their descriptions. Hints: Donating to Spotlight is easier when triggered by your main app, for instance, donating the identifiers of your objects once the app has launched or been modified. Ensure you adopt intent and entity schemas so your app's content contributes to the Spotlight semantic index and enables natural language actions. For complex tasks, create app skills by adding a Skills.skillsbundle with Markdown instructions to provide additional context and guidance on how tool intents fit together, which one to prefer, or what to avoid. Make sure you list your key shortcuts, along with their respective intents, phrases, and short titles, in your AppShortcutsProvider to make them discoverable via Siri phrases in Shortcuts app: struct XYZShortcutsProvider: AppShortcutsProvider { @AppShortcutsBuilder static var appShortcuts: [AppShortcut] { AppShortcut( intent: GameStatusIntent(), phrases: [ "Game status in \(.applicationName)", ], shortTitle: "Game Status" ) AppShortcut( intent: GameStartIntent(), phrases: [ "Start xyz in \(.applicationName)", ], shortTitle: "Start Game" ) } }There is much more to explore and take advantage of, including pre-built schemas, queries, filters, and app skills. I have covered the basics that I found useful for getting started. Hope this helps!
6d
Reply to virtio_net_hdr recommendations
@DTS Engineer Hey Quinn! How's it going? Hope you’re smashing it today—whatever “it” happens to be! Bit of a mix-up earlier. English isn’t my first language, and sometimes my grammar takes a tea break right when I need it. Cheers for bearing with me! I'm trying to make sure that the first 12 bytes are always valid virtio_net_hdr. I am just asking because when the interface is up, it takes a little while before the values show up. In a write routine, which feature flags should be set to ensure optimal networking performance, corresponding values seen earlier from a read routine? Thanks a bunch!
Apr ’25
Reply to FYI: Xcode and Disk Space
I recently encountered a similar issue. To resolve it, I first listed all the devices from Terminal using the following command: xcrun simctl list devices Next, I selected the devices I wanted to delete and executed the following command, replacing DEVICE_UUID with the actual device ID obtained from the previous command: xcrun simctl delete DEVICE_UUID Alternatively, you can delete all the devices by executing the following command: Note: The commands below will erase all simulator data and applications. xcrun simctl delete all Other appropriate methods include deleting devices directly from the following location: ~/Library/Developer/CoreSimulator/Devices Then, execute the following command: xcrun simctl delete unavailable Also, If you have unused old runtimes, delete them. List them using: xcrun simctl list runtimes Then, go to Settings > General > Storage > Developer to remove unused runtimes.
Jan ’25
Reply to No git init option when creating new project in Xcode 16
I believe the git init option is available in the Xcode version you mentioned, which is 16.2. Just after the panel where you declare your Product Name, Team, and other options, click on "Next." A save panel will appear, and you'll see a checkbox for "Create Git repository on my Mac." Alternatively, you can access the "Integrate" menu from the Xcode menu bar and select "New Git Repository..." if you prefer to create your repository later. I highly recommend creating and managing your repository using Xcode rather than Terminal or any other third-party application. This is because Xcode may crash occasionally if you attempt to modify your repository while the project is open. If you must do so, ensure that you close your project before making any changes outside of Xcode.
Jan ’25
Reply to Do not have permission to open the file
To access files outside your app's sandbox, enable the "User Selected File" access type with read/write permissions in your app's entitlements. Then, use NSOpenPanel to allow the user to select the file or directory they want to access. This approach ensures that you can access the necessary files while maintaining the safety of your app from sandbox restrictions.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’25
Reply to How do I block certain apps from Network users.
The crucial aspect here is that those devices should be supervised via MDM to achieve your objectives effortlessly. Windows Servers can be integrated with MDM solutions to manage devices, but it does not natively provide MDM capabilities. To prevent network users on Mac Minis from accessing specific applications like Terminal and Passwords, you can create a configuration profile using Apple Configurator 2. This profile enables you to block certain applications and enforce restrictions across multiple devices. Below is a simplified guide on how to create and apply the profile. If you're using an MDM solution, you can also upload this profile to your MDM server and remotely deploy it to all Mac Minis. To create a configuration profile in Apple Configurator 2 that restricts specific apps like Terminal and Passwords, follow these steps: Open Apple Configurator 2. Create a new profile (e.g., "Restrict Apps for Network Users"). Go to the Restrictions section and click on Apps under Restrict App Usage (supervised only). Change the setting to "Do not allow some apps". Add Terminal and Passwords (or other apps you want to restrict) to the list. Save the profile. Connect your Mac Minis to the macOS device running Apple Configurator 2 via USB. Select the Mac Minis in Apple Configurator 2. Drag and drop the saved profile onto the selected devices or use menu Action > Add > Profile. Please refer to the attached screenshot.
Jan ’25
Reply to Configuring vmnet_read_max_packets_key and vmnet_write_max_packets_key
Thank you for the explanation! What routine is returning that error? vmnet_write? The error happens when I try to write the data from vmnet_read to the VM's file descriptor, for example, when downloading a set of packages from the Internet using shared mode. The first thing I did was set up the dictionary with the vmnet_read_max_packets_key and vmnet_write_max_packets_key as suggested. However, I noticed that after starting the interface, I’m unable to retrieve the set values—they always return 0. I’ve also experimented with different values, whether below the suggested limit, higher, or even very low unsigned integers, but there doesn’t seem to be any noticeable effect. That said, I’m able to set other keys and retrieve their values without any issues, so this behavior seems specific to these particular keys. To further investigate, I started the interface without adding those keys, and here’s what I observed when sending packets back to the vm: First round (233 packets) – All packets were delivered successfully without any issue. Second round (63 packets) – Again, all packets were delivered successfully. Third round (10 packets) – One packet failed with the error: "No buffer space available." The rest were delivered successfully. This suggests that the system was able to handle 233 and 63 packets without any issues, but when sending 10 packets, the "No buffer space available" error occurred randomly, regardless of the number of estimated packets. It’s puzzling because even in the case of 233 packets, they were all delivered, which exceeds the previous 200-packet historical limit (now 256). Take a look at the logs below: Estimated packets: 233 > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes ... etc all delivered Estimated packets: 63 > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes ... etc all delivered Estimated packets: 10 > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 632 bytes > TX 1506 bytes ENOBUFS > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes Here is another example Estimated packets: 8 > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS > TX 632 bytes > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS Estimated packets: 25 > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 632 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1284 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes Note: TCP has built-in mechanisms to handle retransmissions of dropped packets, but other protocols might not have such error recovery, leading to potential data loss or incomplete transfers. If you have any insights or suggestions, I’d be grateful for your thoughts on this.
Jan ’25
Reply to Support new Siri AI APIs while keeping backwards compatibility
There may be a better way, but this implementation cuts down on duplicate code while still supporting versions prior to macOS 27.3 import AppIntents protocol RollProtocol: AppIntent {} extension RollProtocol { func perform() async throws -> some IntentResult { return .result(value: "Test123") } } struct RollIntent: RollProtocol { // compatibility implementation } @available(macOS 27.3, *) @AppIntent(.tool) struct RollTool: RollProtocol { // Tool specific implementation }
Replies
Boosts
Views
Activity
6d
Reply to Siri AI Developer Preview — Siri never calls an app's @AppIntent(.tool) intents on macOS 27.3 beta
Hi @Alexgaillard! Here, I share some steps for the Siri AI Developer Preview, which I typically practice to ensure tools are recognized by Siri AI. Before going into that I'd like to point some findings regarding your questions. Is anything else required for Siri to consider an app's tool intents on macOS (developer setting, Spotlight indexing of entities, a minimum number of donations, a skills bundle)? Most likely, Siri AI requires your AppIntent to have the new macro @AppIntent(.tool). This is the baseline to get Siri AI recognize the intent as a tool, regardless if you'll reuse it any where else such as Shortcut or Widget. Is the preview's tool calling supported on macOS 27.3 beta in French (France) today? As per of Requirements for Siri AI you are all set for macOS but not iOS in EU. Is it expected that tool intents do not appear in the Shortcuts app? Yes, Tool intents marked with @AppIntent(.tool) are designed specifically for Siri AI's reasoning engine. Whereas, AppShortcut is used to expose intents as voice triggers or actions in the Shortcuts app. Tool intents do not necessarily appear in the Shortcuts app. It is possible to be re-used for both Siri AI and Shortcut with same AppIntent. Is there sample code for the preview that we could run first to check our environment? I believe there is a new one released this week. Integrating your messaging app with Apple Intelligence Now, to elobrate more to steps I usually do let's starts with basics. First, validate the path of the loaded intents, execute this in the Terminal: pluginkit -m -v -i com.example.intentsI encountered a situation where a different path is used than the most recent build. Specifically, this happens when an archived version (release), a DerivedData version (debug), and/or an /Application folder version are present. Second, after a successful build, the first thing I'd usually do is terminate "the old" intents via: pkill -f TARGET_NAMENOTE: If the intents in a different target than your main app, use the target name of the intents, not your main app. Third, validate the number of entities and tools of your intents via: xcrun sirimetadataanalyzer <App.app | Metadata.appintents | extract.actionsdata>Expected output: X intents (N tools), Z entitiesWhere N represents the number of tools recognized. Finally, ask Siri in a new conversation, "What tools do you have for APP_NAME?" If it responds with "based on last conversation..." ignore it; the tools are not loaded. It should respond with a list of all of your tools and their descriptions. Hints: Donating to Spotlight is easier when triggered by your main app, for instance, donating the identifiers of your objects once the app has launched or been modified. Ensure you adopt intent and entity schemas so your app's content contributes to the Spotlight semantic index and enables natural language actions. For complex tasks, create app skills by adding a Skills.skillsbundle with Markdown instructions to provide additional context and guidance on how tool intents fit together, which one to prefer, or what to avoid. Make sure you list your key shortcuts, along with their respective intents, phrases, and short titles, in your AppShortcutsProvider to make them discoverable via Siri phrases in Shortcuts app: struct XYZShortcutsProvider: AppShortcutsProvider { @AppShortcutsBuilder static var appShortcuts: [AppShortcut] { AppShortcut( intent: GameStatusIntent(), phrases: [ "Game status in \(.applicationName)", ], shortTitle: "Game Status" ) AppShortcut( intent: GameStartIntent(), phrases: [ "Start xyz in \(.applicationName)", ], shortTitle: "Start Game" ) } }There is much more to explore and take advantage of, including pre-built schemas, queries, filters, and app skills. I have covered the basics that I found useful for getting started. Hope this helps!
Replies
Boosts
Views
Activity
6d
Reply to virtio_net_hdr recommendations
@DTS Engineer Hey Quinn! How's it going? Hope you’re smashing it today—whatever “it” happens to be! Bit of a mix-up earlier. English isn’t my first language, and sometimes my grammar takes a tea break right when I need it. Cheers for bearing with me! I'm trying to make sure that the first 12 bytes are always valid virtio_net_hdr. I am just asking because when the interface is up, it takes a little while before the values show up. In a write routine, which feature flags should be set to ensure optimal networking performance, corresponding values seen earlier from a read routine? Thanks a bunch!
Replies
Boosts
Views
Activity
Apr ’25
Reply to FYI: Xcode and Disk Space
I recently encountered a similar issue. To resolve it, I first listed all the devices from Terminal using the following command: xcrun simctl list devices Next, I selected the devices I wanted to delete and executed the following command, replacing DEVICE_UUID with the actual device ID obtained from the previous command: xcrun simctl delete DEVICE_UUID Alternatively, you can delete all the devices by executing the following command: Note: The commands below will erase all simulator data and applications. xcrun simctl delete all Other appropriate methods include deleting devices directly from the following location: ~/Library/Developer/CoreSimulator/Devices Then, execute the following command: xcrun simctl delete unavailable Also, If you have unused old runtimes, delete them. List them using: xcrun simctl list runtimes Then, go to Settings > General > Storage > Developer to remove unused runtimes.
Replies
Boosts
Views
Activity
Jan ’25
Reply to No git init option when creating new project in Xcode 16
I believe the git init option is available in the Xcode version you mentioned, which is 16.2. Just after the panel where you declare your Product Name, Team, and other options, click on "Next." A save panel will appear, and you'll see a checkbox for "Create Git repository on my Mac." Alternatively, you can access the "Integrate" menu from the Xcode menu bar and select "New Git Repository..." if you prefer to create your repository later. I highly recommend creating and managing your repository using Xcode rather than Terminal or any other third-party application. This is because Xcode may crash occasionally if you attempt to modify your repository while the project is open. If you must do so, ensure that you close your project before making any changes outside of Xcode.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Do not have permission to open the file
To access files outside your app's sandbox, enable the "User Selected File" access type with read/write permissions in your app's entitlements. Then, use NSOpenPanel to allow the user to select the file or directory they want to access. This approach ensures that you can access the necessary files while maintaining the safety of your app from sandbox restrictions.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to How do I block certain apps from Network users.
The crucial aspect here is that those devices should be supervised via MDM to achieve your objectives effortlessly. Windows Servers can be integrated with MDM solutions to manage devices, but it does not natively provide MDM capabilities. To prevent network users on Mac Minis from accessing specific applications like Terminal and Passwords, you can create a configuration profile using Apple Configurator 2. This profile enables you to block certain applications and enforce restrictions across multiple devices. Below is a simplified guide on how to create and apply the profile. If you're using an MDM solution, you can also upload this profile to your MDM server and remotely deploy it to all Mac Minis. To create a configuration profile in Apple Configurator 2 that restricts specific apps like Terminal and Passwords, follow these steps: Open Apple Configurator 2. Create a new profile (e.g., "Restrict Apps for Network Users"). Go to the Restrictions section and click on Apps under Restrict App Usage (supervised only). Change the setting to "Do not allow some apps". Add Terminal and Passwords (or other apps you want to restrict) to the list. Save the profile. Connect your Mac Minis to the macOS device running Apple Configurator 2 via USB. Select the Mac Minis in Apple Configurator 2. Drag and drop the saved profile onto the selected devices or use menu Action > Add > Profile. Please refer to the attached screenshot.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Configuring vmnet_read_max_packets_key and vmnet_write_max_packets_key
Thank you for the explanation! What routine is returning that error? vmnet_write? The error happens when I try to write the data from vmnet_read to the VM's file descriptor, for example, when downloading a set of packages from the Internet using shared mode. The first thing I did was set up the dictionary with the vmnet_read_max_packets_key and vmnet_write_max_packets_key as suggested. However, I noticed that after starting the interface, I’m unable to retrieve the set values—they always return 0. I’ve also experimented with different values, whether below the suggested limit, higher, or even very low unsigned integers, but there doesn’t seem to be any noticeable effect. That said, I’m able to set other keys and retrieve their values without any issues, so this behavior seems specific to these particular keys. To further investigate, I started the interface without adding those keys, and here’s what I observed when sending packets back to the vm: First round (233 packets) – All packets were delivered successfully without any issue. Second round (63 packets) – Again, all packets were delivered successfully. Third round (10 packets) – One packet failed with the error: "No buffer space available." The rest were delivered successfully. This suggests that the system was able to handle 233 and 63 packets without any issues, but when sending 10 packets, the "No buffer space available" error occurred randomly, regardless of the number of estimated packets. It’s puzzling because even in the case of 233 packets, they were all delivered, which exceeds the previous 200-packet historical limit (now 256). Take a look at the logs below: Estimated packets: 233 > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes ... etc all delivered Estimated packets: 63 > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes ... etc all delivered Estimated packets: 10 > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 632 bytes > TX 1506 bytes ENOBUFS > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes Here is another example Estimated packets: 8 > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS > TX 632 bytes > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS Estimated packets: 25 > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 632 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes ENOBUFS > TX 1506 bytes ENOBUFS > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1284 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes > TX 1506 bytes Note: TCP has built-in mechanisms to handle retransmissions of dropped packets, but other protocols might not have such error recovery, leading to potential data loss or incomplete transfers. If you have any insights or suggestions, I’d be grateful for your thoughts on this.
Replies
Boosts
Views
Activity
Jan ’25