Did you try to apply for com.apple.developer.device-information.user-assigned-device-name entitlement? I presume it may grant you access to the hostname.
Topic:
App & System Services
SubTopic:
Core OS
Tags: