When interoperating with C++ code, should you create your ViewController as a .mm file or should you instead setup a facade between your controller and the C++ class?
What are the downsides of making a ViewController class become Objective-C++?
When interoperating with C++ code, should you create your ViewController as a .mm file or should you instead setup a facade between your controller and the C++ class?
What are the downsides of making a ViewController class become Objective-C++?
If you plan to use the C++ code from different places (say, different view controllers), it may pay off to make a wrapper class to have everything encapsulated nicely. That way you'll only have one .mm
file instead of several of them.
This answer contends that .mm files take more time to compile. Check it out for additional information on Objective-C++.
In any case, I'd try to keep ObjC and C++ as isolated as possible, if only for increased maintainability and simplicity.