I have been working with google analytics
fine for the past year and now I am switching to swift
. I have a problem importing it using the pods
[ I have done an extensive search and it seems a problem with [use_frameworks!] that is required by Alamofire
.
I have added the SDK manually, that is libGoogleAnalyticsServices.a
and imported some other files in a bridging file called header-Bridging-Header.h
:
#import <Google/Analytics.h>
#import <libGoogleAnalyticsServices.a>
#import "GAI.h"
#import "GAIDictionaryBuilder.h"
#import "GAIEcommerceFields.h"
#import "GAIEcommerceProduct.h"
#import "GAIEcommerceProductAction.h"
#import "GAIEcommercePromotion.h"
#import "GAIFields.h"
#import "GAILogger.h"
#import "GAITrackedViewController.h"
#import "GAITracker.h"
now in AppDelegate.swift
I am trying to configure tracker from GoogleService-Info.plist.
var configureError:NSError?
GGLContext.sharedInstance().configureWithError(&configureError)
if configureError != nil {
println("Error configuring the Google context: \(configureError)")
}
but it shows an error used of unresolved identifier GGLContext