2

This came up for me when I tried to integrate AdMob using Cocoapods into an Objective C++ project.

use of '@import' when c++ modules are disabled, consider using -fmodules and -fcxx-modules

What is this error and how do I fix it?

bobobobo
  • 61,493
  • 58
  • 247
  • 347

1 Answers1

2

Fix is easy, you have to do what the warning says and not only enable C and Objective-C modules but also C++ modules.

So you must add the compiler flag -fcxx-modules to "Other C++ Flags" in your Build Settings

bobobobo
  • 61,493
  • 58
  • 247
  • 347