Proper way to determin iPhone vs. iTouch
Submitted by drunknbass on December 28, 2007 - 1:50am.
this inherits from OS 10+ header "NSProcessInfo.h"
I keep seeing people write way too much code to get this simple little detail, and thought id offer the (correct) method i use to do it.
NSString *hostName = [[NSProcessInfo processInfo] hostName];
if (hostName) {
NSLog(@"Host: %@",hostName);
}
if (hostName) {
NSLog(@"Host: %@",hostName);
}
this inherits from OS 10+ header "NSProcessInfo.h"
What if a user changes their
What if a user changes their hostname?? This would no longer give anything good.
so how would the expected
so how would the expected response for an iPhone look?
Try out the code and look
Try out the code and look into your Log file, i guess ? ;)