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 ?

Yes, it same for me also with macOS and network connections, especially when dealing with Sequoia's sandboxing and security requirements. The restriction you mentioned can be quite inconvenient for debugging purposes.

Thanks

Sairam Agireeshetti

I’d appreciate you filing a bug about this. Make sure to include a sysdiagnose log taken immediately after your app was denied access to the network without a prompt.

Please post your bug number, just for the record (and so that I can add my own comments to it).

For context, it’s not uncommon for macOS to fail to work correctly with apps outside of the Application folder. In most cases that’s caused by edge cases, like a corrupt Launch Services database or a MAC restriction [1]. However, I just tried the simplest possible case here in my office [2] and it failed, suggesting that this is a serious systematic problem.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] See On File System Permissions.

[2] Specifically, I started with a fresh versions of macOS 15 beta, copied across a new app that’d never seen before, and launched it from my home directory (which is not protected by MAC). It did this problem, which was quite surprising.

Cannot connect to local network devices via TCP when the application is not in the Applications folder
 
 
Q