Using callback function in C app with swift library

Hey, i just did a answer into this same question but with C++. I have pointed a possible solution there and i think it can work for your case too.

I hope it helps.