My apps are a lot of cpu and memory are affected by.
So a different unit divided by the variable must be initialized. But this I would like to know at compile time rather than at runtime.
Runtime hours can know how to distinguish.
How do I distinguish at compile time?
Know how to distinguish between OS versions, which I do not know the law to distinguish between devices.
The following code is only os divide. but, i would like to detailed device information.
(iPod Touch 3/iPod Touch4/ iPhone3GS/ iPhone4/ iPhone4S/ iPad/ iPad2)
#if __IPHONE_OS_VERSION_MIN_REQUIRED <= __IPHONE_4_0
const static NSTimeInterval TIME_INTERVAL = 0.3;
#elif __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_4_0
const static NSTimeInterval TIME_INTERVAL = 0.1;
#endif
It should be pretty obvious that there is no way to decide at compile time which device your code runs on. All devices run the same executable. The only possible distinction that could be made at compile time would be the one between armv6 (everything older than the iPhone 3Gs) and armv7.