Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

processInfo.hostName requires 'local network' permission on iOS

Either processInfo.hostName should return the same info as UIDevice.name ("iPhone") or it should require the same entitlement that UIDevice.name does to return the actual result.

If processInfo.hostName is intended to return the local Bonjour name, why does it need 'local network' permission? Why isn't the 'local network' permission documented for processInfo.hostName as this is hard to track down?

Tested on iOS 18.5

Answered by DTS Engineer in 844587022

I have an extensive discussion of the various host names in On Host Names.

Why isn't the 'local network' permission documented for processInfo.hostName as this is hard to track down?

Because at the time I wrote TN3179 I assumed that it obviously fell into the Resolving a local DNS name bucket. However, clearly my assumption was wrong, because you’re the second person to be tripped up by this in recent weeks.

I’d appreciate you filing a bug about this against TN3179. That’ll remind me to fix this the next time I update that technote.

Please post your bug number so I can make sure it lands in my queue.

Share and Enjoy

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

I have an extensive discussion of the various host names in On Host Names.

Why isn't the 'local network' permission documented for processInfo.hostName as this is hard to track down?

Because at the time I wrote TN3179 I assumed that it obviously fell into the Resolving a local DNS name bucket. However, clearly my assumption was wrong, because you’re the second person to be tripped up by this in recent weeks.

I’d appreciate you filing a bug about this against TN3179. That’ll remind me to fix this the next time I update that technote.

Please post your bug number so I can make sure it lands in my queue.

Share and Enjoy

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

Feedback is FB18207031 and mentions TN3179

processInfo.hostName requires 'local network' permission on iOS
 
 
Q