+ 2
how to call c++ method in swift?
I don't want to implement the whole project. I write business logic in c++ and I use that codes with android NDK. I don't know how to use that c++ code/library in swift.
1 Answer
+ 1
You could use objective-c's support of c++. Xcode allow to use Swift and Objective-c code together by creating bridging header file. Check ' Swift and Objective-C in the Same Project' page on Apple official site. You need to create such file and import your c++ code in it using @import "name of your c++ header". After that you could use c++ methods as native for Swift.