Hello,
I am building a sample/example iOS app with SwiftUI to demonstrate the integration of our text to speech library (university research team).
I have create a bridging header and added the line to import the .h file exposing the C type functions.
However, when I try the preview build, it falls over on the imported header.
At the top of the header is this :
#if defined(__APPLE__)
#define TTS_API extern "C" __attribute__((visibility("default")))
#else
#define TTS_API extern "C"
#endif
TTS_API void run_process(...)
The error message states :
Expected identifier or '('
At the beginning of the line holding the function definition (parameters removed for simplicity),with a reference to the macro expansion of TTS_API.
This macro (2nd line), however, is necessary for building the library for iOS.
What needs to be done in order to get the swift compiler to correctly handle this, please ?
Note that I am using XCode v12.2