Detect iOS and iPad iOS versions properly.