I\'m currently using this code
NSHost *host = [NSHost hostWithAddress:hostname]; if (host == nil) { host = [NSHost hostWithName:hostname]; if (ho
http://developer.apple.com/iphone/library/qa/qa2009/qa1652.html
Got a great little answer through the Developer Support system, this worked perfectly.