0

I have some C files that are dependent on iOS 9, (using new features from the accelerate framework) and want to be able to check the current iOS version without using Objective-C.

Is there anyway to do this?

olynoise
  • 1,966
  • 2
  • 17
  • 32

1 Answers1

4

Do not check the version of iOS. The proper solution is to check if the desired API is available. In this case you wish to use the vDSP_biquadm_SetTargetsDouble function. As described in the SDK Compatibility Guide, the proper way is this:

if (vDSP_biquadm_SetTargetsDouble != NULL) {
    // The vDSP_biquadm_SetTargetsDouble function exists, use it here
} else {
    // There is no vDSP_biquadm_SetTargetsDouble function. Do something else (or nothing)
}
rmaddy
  • 307,833
  • 40
  • 508
  • 550