Post

Replies

Boosts

Views

Activity

Cannot connect to local network devices via TCP when the application is not in the Applications folder
It looks like that, with Sequoia, it is not possible to open an NSURLSession or any other TCP connection to a machine on the local network if the application is not in the "Applications" folder. That is pretty inconvenient when debugging or running via Xcode since the build folder is not within the Applications folder. And, yes, the NSLocalNetworkUsageDescription key and description strings are in the Info.plist file (and it asks for permission). How can we expect to debug applications like that ? Is anybody else experiencing this ?
2
1
691
Jul ’24
performDefaultImplementation of an AppleScript is not called while a menu is open
Apparently, the call to performDefaultImplementation of an AppleScript is called on the main runloop with the defaultModes only, so it is not called while a menu (or contextual menu) is open. This is very unfortunate as it means the execution of these scripts is delayed until after the menu is closed. Looking for a way to change this behaviour but I have no clue how... Thanks ! Daniel
0
0
642
May ’23
AVAudioEngine: routing different AVAudioPlayerNodes to different channels
Hi, I have been searching all over for a way to do this on macOS: playing different stereo files on different pairs of audio outputs of the same hardware device. I am currently using AVAudioEngine with two AVAudioPlayerNodes and I can mix them and change the mapping of the entire mix through the use of AudioUnitSetProperty on the engine output, but I cannot have multiple AVAudioPlayerNodes play on different outputs. Obviously, being on macOS I cannot use AVAudioSession... Thank you if anyone has any idea on how to achieve this !
0
1
933
Jan ’23
Network framework: creating multiple listeners with the same port number?
I am trying to have multiple applications listen to the same port but from different local IP addresses but it looks like it doesn't work. Here is my code: localEndPoint = nw_endpoint_create_host(ip1, port1234) nw_parameters_set_local_endpoint(params, localEndPoint); ... nw_listener_create(params) ... So application 1 will use ip1 and application 2 a different local address (ip2) to listen from. When I do that, the second app launched always fails to start the listener with an "address already in use" error. I thought it was possible, but I am obviously wrong... Any insight anyone ? Thanks ! Daniel
7
0
1.2k
Aug ’22
How to "upgrade" an HTTP connection to a WebSocket
Hi, I have been successful at writing Swift code using a NWListener to listen to WebSocket connections on a specific port, but I do not seem to be able to get the path from the URL for creating different types of connections. For instance, differentiating between ws://127.0.0.1:80/updates and ws://127.0.0.1:80/changes. I'd like to be able to get the "updates" or "changes" part when I receive the new connection notification. Having more sample code around WebSockets and how the upgrade process works that would also be great. Thank you ! Daniel Tapie
3
0
3.7k
Sep ’20