I am having much trouble integrating Google Analytics SDK into my iOS project. I am using XCode 7 and targeting iOS 7. Using Swift 2.0. However I can get the sample working ok (
Solved it by going away from Googles own tutorial and not use GGLContext
and importing headers directly.
My podfile:
platform :ios, ’7.0’
use_frameworks!
pod 'GoogleAnalytics'
And BridgingHeader.h
:
#import "GAI.h"
#import "GAIDictionaryBuilder.h"
#import "GAIFields.h"
And setup:
let gai = GAI.sharedInstance()
let id = "my-GA-id"
gai.trackerWithTrackingId(id)
gai.trackUncaughtExceptions = true
gai.logger.logLevel = GAILogLevel.Verbose
Also added to User Header Search Paths
:
$(SRCROOT)/Pods/GoogleAnalytics (recursive)