Do you mean hostname / localhost name? You can use the SystemConfiguration framework:
#include <stdio.h>
#include <SystemConfiguration/SystemConfiguration.h>
int main() {
char hostname[1024];
const char* name = "name";
CFStringRef nameRef = CFStringCreateWithCString(kCFAllocatorDefault, name, kCFStringEncodingASCII);
SCDynamicStoreRef store = SCDynamicStoreCreate(kCFAllocatorDefault, nameRef, NULL, NULL);
CFStringRef hostnameRef = SCDynamicStoreCopyLocalHostName(store);
CFStringGetCString(hostnameRef, hostname, 128, kCFStringEncodingUTF8);
printf("Hostname: %s\n", hostname);
}
Post
Replies
Boosts
Views
Activity
This is a disruptive problem for us as well. Same 500 errors. Had to spend time yesterday re-implementing altool with polling, which seems to take much longer than using notarytool with --wait. Lots of time wasted troubleshooting and updating build scripts, when I have product updates I need to distribute.
How does Apple not see the 500 errors, which are internal server errors. How do you get a "local" 500 error, unless from terrible programming? ¯_(ツ)_/¯.