2

I'm trying ti use Google analytics in my app. I followed instructions on Google Developers website. When I try to compile it I get an error which says Use of '@import' when modules are disabled. Thing is that modules are enabled. I'm not using modules in my app code, only standard, old-fashioned #imports. Google Analytics is the only library which uses them. Any idea what is wrong?

pawel.kalisz
  • 1,246
  • 1
  • 18
  • 26

2 Answers2

0

I spent 4 hours in this issue. My fault was simply because I was using Objective C++ as the Compile Source. So I changed to the default one in Build Settings "According to File Type". Then everything is okay...!! Phew!!!...

Compile Source As

However on the other hand, if you need any specific header or implementation files in a specific language (C/C++). You can do so by changing it on the right column (Utilities) when viewing that file. I would never set my Compile Source globally anymore.

Type of language to compile

Hope this helps.

thkeen
  • 1,857
  • 2
  • 13
  • 16
0

Please try my answer here: https://stackoverflow.com/a/36267420/882187

It's easy enough workaround with code sample for Google Analytics, to use GA in projects containing .mm

Community
  • 1
  • 1
Vladimir Ignatev
  • 2,054
  • 1
  • 20
  • 34