How to create new class with .mm file

I want to create new class in iOS project and when I adding class from New File - iOS C++, then my new file have .cpp at the end. How to add file with .mm ?

This is to be expected, FILE.cpp is a C++ source file, as you’ve selected in the New File dialogue. If you instead want it treated as Objective-C++ source, you can simply rename the file extension to FILE.mm and the compiler should take note and now treat it as Objective-C++. This can be verified by selecting the file in the Xcode Project Navigator, showing the File Inspector and now the Type should display as Objective-C++ Source.

1 Like

Is new class must includ any ofxExtras or be inherited from any core iOS classes?
Cose when I write just
class MyClass {};
compiller write errors .

Oh. All class must be write in one .h file.

THANK YOU THIS WAS VERY HELPFUL


Omair