I have added one framework in my project, where to get the callbacks of framework I need to implement c++ code,for which I have added c++ classes which are .mm from .cpp
I think problem is that your's .h-file, where you have added C++ includes is included in other .m-files, not just in .mm. There is several ways to solve this problem:
Include them in
#ifdef __cplusplus
#endif
block. Also use this block for methods where C++ classes mentioned. For example:
#ifdef __cplusplus
#include <string>
using namespace std;
#endif
@interface SomeClass
#ifdef __cplusplus
- (void) setName:(const string&) name;
#endif
@end
Also there is way to avoid #ifdef #endif
block by using extensions and categories: