Post

Replies

Boosts

Views

Activity

Reply to Testing endpoint security on a virtual Mac
For real devices, someone (it might be the Account Owners, or perhaps any Admin) can go to the Devices section of the Accounts tab of developer.apple.com, and add the "Provisioning UDID" of a device to the list of devices. I've never tried this for a virtual Mac. You can find the Provisioning UDID of your Mac in the Hardware section of System Information. Bear in mind that you can have a maximum of 100 devices on your developer account, and that list can only be pruned once a year. So if you re-create your virtual Mac often, and it has a different Provisioning UDID every time, you may run out of devices. If you build your software on a Mac with Xcode, with automatic signing turned on, that Mac will be automatically added to the list of developer devices. The process of manually adding to the list is only necessary for pure "victim" devices which need to run development software.
2w
Reply to Swift Testing environment differences from regular executable
I lied. Inadvertently. Sorry. I put all the code (create and find) into one function and ran it from a standalone executable - it fails. If I create two separate standalone executables, one that creates, and another that finds, and run those one after the other, the find executable succeeds. In the single-executable case, I can add this line between creation and finding to make it work: RunLoop.main.run(until: Date().addingTimeInterval(0.5)) 0.1 seconds was not long enough. I'm not sure about the 0.5s because I've only tried it once. I'm interested in doing this in a test because I'd like to create and destroy many such plugins to check for leaks. But I'm not keen on hard-coded delays. Is there a way to detect when CoreAudio is ready to be interrogated again (rather like IORegistryWaitQuiet)? And is there a way to run a runloop within a Swift Test?
2w
Reply to macOS Menu Bar
You can remove some of the default menu items that don't make any sense for your app by replacing that group of commands with nothing at all, for example CommandGroup(replacing: .textEditing) { } however, if I remove all the text formatting commands, CommandGroup(replacing: .textFormatting) { } I still have a Format menu in the menu bar, but the menu has no content. I don't know how (in SwiftUI) you can entirely remove framework-provided menu items.
Jan ’25
Reply to Sending NVMe Admin Commands
where do you get the documentation that tells you that the method selector should be 1, or that the parameters should be packed the way you have packed them? In general, objects with class names beginning with"Apple" are private to Apple. You can probably do what you're trying to do if you replace the Apple driver, but not through the Apple driver. However, it may not be necessary at all. If I understand this document correctly, all Macs with a T2 chip or M series processor encrypt the built-in storage, all the time. https://support.apple.com/guide/security/volume-encryption-with-filevault-sec4c6dc1b6e/web.
Jan ’25
Reply to DriverKit CppUserClient Searching for dext service but Failed opening service with error: 0xe00002c7
The value kIOPCIDeviceConnectType is just a number, the third parameter to IOServiceOpen called by your user-space client code. That number appears as the first parameter to NewUserClient_Impl in your dext. If your dext is your own, you can use any value you like, or ignore it entirely. If your code is no longer reporting the kIOReturnUnsupported error, but instead printing only "Failed to match to device", that suggests that there's no driver with the correct name installed. Did you call SetName("com.accusys.scsiDriver"); within your dext's Start_Impl()? I've never written a PCI driver, sorry can't help you with that.
Jan ’25
Reply to DriverKit CppUserClient Searching for dext service but Failed opening service with error: 0xe00002c7
0xe00002c7 is kIOReturnNotSupported (from IOReturn.h). You're trying to open four objects, none of which support that operation. I have had more success using IOServiceNameMatching, and giving the driver a unique name (call SetName in your dext, before RegisterService). This way you should make only one attempt to open your driver through its user client. Also, make sure you actually implement NewUserClient_Impl in your dext.
Jan ’25