Posts

Post marked as solved
1 Replies
Ahh, I see. ReturnsValue is generic and you have to provide the concrete type you are going to return. https://developer.apple.com/forums/thread/723455 So in my case, the perform method signature needs to be func perform() async throws -> some IntentResult & ReturnsValue<Double> The docs could be a bit clearer here IMHO.
Post marked as solved
1 Replies
After some great detective work from another developer it seems that the issue is caused by the "Play user interface sound effects" option in the 'Sound Effects' section of the 'Sound' System Preferences pane. I had to turn that option off, delete my app, reboot, then re-enable that option and the custom sounds now work. The .caf files still don't work, but that can be worked around.
Post not yet marked as solved
1 Replies
I cross-posted to StackOverflow and got this useful answer: https://stackoverflow.com/a/68397848/568104 Apparently iBeacon APIs are not available on MacOS, despite the docs stating that they are available on MacOS.
Post marked as solved
3 Replies
I see. Thanks very much for your detaiied reply Quinn.I was searching for domains as (the way that I read them) the docs rather implied that one should. They don't mention that the inDomain: parameter is valid with an empty string (or what that would do), and they state in the overview:"Once your object is ready, you begin by gathering the list of accessible domains using either the searchForRegistrationDomains() or searchForBrowsableDomains() methods. From the list of returned domains, you can pick one and use the searchForServices(ofType:inDomain:) method to search for services in that domain.The NSNetServiceBrowser class provides two ways to search for domains. In most cases, your client should use the searchForRegistrationDomains() method to search only for local domains to which the host machine has registration authority. This is the preferred method for accessing domains as it guarantees that the host machine can connect to services in the returned domains. Access to domains outside this list may be more limited."Thanks for the linkl to NWBrowser - I was going to say that I was avoiding the Network Framework as it's only available on Apple platforms, whereas Foundation is available on Linux as well (this may potentially end up on a Raspberry Pi) - although I've just noticed that NetServiceBrowser isn't implemented in the Open Source version of Foundation.... 😟Thanks for your help.