The tutorial is very well made and does lead to a functioning project, but it is far too complex to see if one can call into the library from Xojo. At least with my limited comprehension of Objective-C.
Amazing how it seems nobody thought about doing a very simple example, akin to the excellent tutorial on the Xojo blog for .NET DLL access. Someone defined static libraries in Objective-C as a pain in the behind. He may be right.
It doesn’t work for me well here.
It compiles, but app doesn’t launch.
Anyway, unless Xojo Inc get it supported for the future, it’s just a hack. To build products for it, we need to have it work for Simulator and Device and supported for the future.
[quote=161841:@Christian Schmitz]It doesn’t work for me well here.
It compiles, but app doesn’t launch.
Anyway, unless Xojo Inc get it supported for the future, it’s just a hack. To build products for it, we need to have it work for Simulator and Device and supported for the future.[/quote]
We will have to wait for something Xojo supports officially… Next year or so ?
Like if declare has .a lib Xojo looks for a static lib in project folder with matching name?
And that static lib has all code for simulator and device (32+64bit), so Xojo can pick platforms as needed.
At XDC, Geoff talked about a new plugin format that will enable writing plugins in C/C++, but also in Xojo. Most importantly for this thread, the new plugin format should support iOS. Apparently that should be available towards the end of the year.
Maybe an alternative: Daniel and I have been working on a few Accelerate framework features. There’s only a handful of declares currently available in the next release of iOSLib I will put online shortly but it shouldn’t be that difficult to extend. He’s been doing some FFT calculations on it with really good results.
Drawback: The data format Apple uses for Accelerate is really a pain. I’ve been thinking on adding some convenience methods but I cannot recommend it. Conversion simply takes too long, so you’re much better prepared if you build your own structures around Apple’s defaults.
(Some numbers for comparison: Doing a simple vector multiplication with Accelerate takes only 20% of the time a pure Xojo matrix multiplication needs. But converting NSPoints which I used to the MemoryBlock format Apple demands and back made the method take 6 times as long as Xojo. Anway, FFTs or other DSP methods are usually for number crunching, and it looks very much like a conversion in that case is not such a show-stopper.)