This question addresses how to conditionally include code based on iOS version. But how does it work?
Suppose I set iOS Deployment Target
to 3.2 in Xcode 4.5.2. In my code I put in some #ifdef
statements:
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_4_0
// Some iOS 4+ code
#endif
If I run the code on a 3.2 device, this code won't be there, but if I run it on a 4.3 device, it will, right? How does that happen? Or am I misunderstanding what's going on here?