How to determine the current iPhone OS version at runtime and compare version strings?
<p>How can you determine and compare (>, &lt;, etc.) the current OS version of the iPhone that the app is running on? There is a certain bug in 3.0 but not in 3.1+ so I'd like to be able to skip out a bit of code if the current OS version is not >= 3.1. </p>

<p>This needs to be at runtime not compile time!</p>
