I think this isn't doing what you expect because it is a command line program without a running run loop.
You could put your code into an regular application, or you could try calling
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 10.0, false);
instead of your sleep(10) calls
I looked at my own code, but I found I never uninstall my listener blocks so I've never tripped over this problem. I do have a command line program with an explicit call to CFRunLoopRunInMode though...
Post
Replies
Boosts
Views
Activity
did RegisterService succeed on all the systems?
The message tells you the problem. Your type, Tag, does not conform to Hashable.
Tell the compiler that Tag should be Hashable:
final class Tag : Hashable {
and then actually conform to it by providing a hashValue property which returns Int. You can probably just use the hashValue of the UUID you already have in your tag, assuming they are all truly unique.
inside Tag:
var hashValue { id.hashValue }
You asked this question before pointing your function at a file much larger than the memory in your machine to find out what happens?
Should it be a problem, you can use CC_MD5_Init, CC_MD5_Update and CC_MD5_Final, breaking up your huge file into manageable chunks.
My specific problem here was that there was no code to sign. I was messing about with two near-identical projects trying to fix a link error, and removed all the code from my dext, then forgot I had done so.
This is what DTS said:
This system extension has no main executable. For some reason it’s gone completely missing, making it a codeless bundle. So, the code signature gets stashed away in extra files in the _CodeSignature directory, and that has no place to store DER entitlements.
DTS (thank you Quinn!) helped me solve this.
The problem is a bug in Xcode's support for DriverKit in projects with a test plan (FB13381958). You have to go into the configuration of the test plan and disable Code Coverage for all targets. Disabling Code Coverage for the driver target only does not work .
Note that there's a code coverage setting in the target's Build Settings too, but changing that setting won't make the link error go away.
does this affect you: https://developer.apple.com/help/account/manage-profiles/provisioning-profile-updates/. ?
also, have a look at https://developer.apple.com/documentation/technotes/tn3125-inside-code-signing-provisioning-profiles
did you check https://www.apple.com/support/systemstatus/ when the problem occurred? Does it still not work? It works for me now, but you posted a day ago
IOServiceNameMatching is a convenience function which creates a matching dictionary with the contents [ "IONameMatch": ], so it is behaving exactly as it should. It does not return an IOService with name matching . The "IOService" prefix serves as a poor man's namespace.
You need to take the matching dictionary and pass it to IOServiceGetMatchingServices, which will return an iterator. You walk through that iterator to get the actual services (if found).
this is a forum where developer can ask software development related questions, and sometimes get answers.
if you have feedback about Apple software or hardware, you can use Feedback Assistant to send that feedback to Apple, or less formally using the web interface at https://www.apple.com/feedback/
if you think it is a bug, file a bug report with Feedback Assistant.
If you want it to wait for user input, attach the breakpoint before you run the program.
Well, there's UIDevice.model, but then you'd need to know all the possible model strings. Also UIKit might lie on a Mac...
The bigger question is - why do you need to know this? What is it about the running on a Mac which should make your app behave differently? You should test for the specific difference, not "is this a Mac", because the specific difference might disappear in iOS 18 or macOS 15.
Your example of the Arduino IDE (from arduino.cc) is a bit strange. This is not a sandboxed application, it doesn't need to ask for permission to access the Documents folder. If I open System Settings/Privacy & Security/Files and Folders, Arduino IDE is not listed there. I don't understand how you managed to disallow access to ~/Documents for that app.
Maybe if you set your Security preference to "Allow applications downloaded from App Store", rather than "Allow applications downloaded from "Allow applications downloaded from App Store and identified developers" you might get behavior closer to what you want/expect?
Have a look at the Info panel in the target settings, check that CFBundleVersion and CFBundleShortVersionString are what you expect. Do they differ from the values in the Info.plist file?
If they are not what you expect, check the Build Settings, filter on CFBundle and check the "All" tab, so you can see how those strings are generated.
There is a setting in Build Settings called "Generate Info.plist file" (under Packaging), which defaults to true. I find it best to keep it at true, and add additional keys/values using the Info tab. I'm not sure what happens if you set one value in Build Settings and another in the Info tab, or a different value directly in the Info.plist file.
You don't need to do anything. You have a version of Xcode that you downloaded from developer.apple.com, rather than a version you obtained through the Mac App Store. That's fine, just use it. I use manual downloads rather than app store downloads because I don't want the app store to automatically download a new version when I'm not ready, and I often keep older or newer (beta) versions around too.