0

Can you help me and provide how exactly to implement GA to Swift-based iOS app?

I am trying do this: GAI.h lib import, but it doesn't work correctly. GAI.sharedInstance().trackUncaughtException = true doesn't work as well because it is unknown method

Thank you!

rafaelc
  • 57,686
  • 15
  • 58
  • 82

1 Answers1

0

Kind of late, but still for those having the same question:

In your [AppName]-Bridging-Header.h (explained here how to add) you would need to import those parts of Google Analytics you need for your project like this:

#ifndef [AppName]_Pregnant_Bridging_Header_h

...
#import "[GA folder name]/GAI.h"
#import "[GA folder name]/GAITrackedViewController.h"
...

#endif

The Google Analytics SDK should now be properly imported for use.

ksundmyhr
  • 24
  • 2