Using C++ in iOS projects / XCode / Objective-C / Cocoa

The trick is an Objective-C wrapper class (which then creates/calls C++ objects) which is compiled as “Objective-C++”.

Create the wrapper class normally but rename the .m file to .mm – nothing else is needed.

No need to change compile settings – I tried to do that way and couldn’t get the project to build without errors.