Google Analytics in iOS 8 using Swift don't work Google Analytics in iOS 8 using Swift don't work swift swift

Google Analytics in iOS 8 using Swift don't work


@Ezequiel Perez : You have to include the targets linked libraries.

CoreData.frameworkSystemConfiguration.frameworklibz.dylib

Try including this....


You have to add all the Objective-C libraries GA needs explicitly.

In the error output you can see that it is looking for Core Data but instead finds "undefined symbols". That shows you that it is missing the library. Notice that the Objective-C libraries are distinct from the modules you import in Swift.

To solve this, go to build phases of your target and link to the necessary libraries, starting with CoreData.framework. Consult the GA documentation on which other libraries you need.

EDIT:

I made a quick app, added GA and made it work by adding the libraries. Maybe you could try removing the libs.dylib library and re-adding it. I also recommend to just include the headers by name

#include "GAI.h"