How would I convert a pid_t instance into a string instance? I know that a pid_t is nothing more than a signed integer, and yet I can’t do something like:
# suppose appID is already an instance of pid_t
NSString *appStringID = [NSString stringWithFormat:@"%@", appID];
Why does this bring up an error?
As a signed integer, it’s just a formatting issue with your NSString:
do this instead:
A format string of “
%@” implies that you’re passing another NSString object in, which an integer (a raw C type) is not.