Is there an API for checking at runtime whether you are running on an iPhone or an iPad?
One way I can think of would be to use:
[[UIDevice currentDevice] model];
And detect the existence of the string @"iPad" - which seems a bit fragile.
In the 3.2 SDK, I see that UIDevice
also has a property which is really what I'm looking for, but doesn't work for pre-3.2 (obviously):
[[UIDevice currentDevice] userInterfaceIdiom];
Are there other ways than checking for the existence of @"iPad" for a universal app?