Bruce C. answered 11/12/20
Experienced iOS and Android application developer
It's rather easy to call most C routines from Swift, since Objective-C is an extension of C and can be used with C code.
C++ is a little more complicated. In some cases, you can put c++ code in an .mpp file and use it with swift, but calling between Swift and C++ can be complicated by the sort of name-mangling C++ (cpp) does with functions and other factors. Another complication is that most Swift applications that use Objective-C and related languages use a "bridging header", which includes C-style .h files to bridge across the gap. However, this won't work with cpp classes, as I found out recently when trying to use the latest cocos2d-x animation software in a Swift package. To do it, I had to build a proxy interface to the cpp objects in Objective-C and then include the proxies in the "bridging header". The details are too involved to explain here.