Access vDSP from swift in simulator to older devices

I am trying to call functions in a vDSP framework from ios 8.1 targeting Swift code using xcode 6.1. Below is an example:

public func create_fft_setup( length: Int ) -> FFTSetup {
let log2N = vDSP_Length(log2(CDouble(length)+1.0))
return vDSP_create_fftsetup(vDSP_Length(log2N), FFTRadix(kFFTRadix2))

      

}

This code matches and works on a simulator for iphone 5, 6 & 6+ and iPad. All legacy devices fail with Swift Compiler error "use unresolved identifier" for vDSP function name. The typedefs from the same header file as the function names are fine. Explicit import of the Accelerate header into the bridged header file is irrelevant.

I am able to compile and run the ok code on two old devices I have, an ipod and a retina ipad.

If I call vDSP functions from objective-C file, there are no complaints.

If I call a function from swift to a function in objc and call vDSP from that function, it works.

So my question is, am I doing something wrong, and if not, is there an easy way to make this work properly? Convenient to use simulator for 4s screen size.

+3


source to share


1 answer


Apple finally fixed this issue in xcode 7 beta 4 or 5 (after 7 months)



0


source







All Articles