Code cracker
Code cracker

Reputation: 3166

calling .cpp files from Objective-C class .m

I have a few classes written in c++ which needs to be integrate with my iOS project written in Objective-C. I got a Mac (C++) project from my client to integrate with my project. I need to call the methods in .cpp class from Objective-C class with NSNotificationCenter or some other way which is better do it?

Upvotes: 0

Views: 151

Answers (1)

Peter Segerblom
Peter Segerblom

Reputation: 2813

If you make a file with extension .mm you can use both Objective-C and C++ inside that one. It can quickly get messy so i usually try to keep the C++ touchpoints contains in a few .mm files so the whole thing won't be a mix of Objective-C and C++ and c code.

Upvotes: 1

Related Questions