objective c - Google Analytics iOS and Alamofire and cocoapods -


i have been working google analytics fine past year , switching swift. have problem importing using pods [ have done extensive search , seems problem [use_frameworks!] required alamofire.

i have added sdk manually , libgoogleanalyticsservices.a , imported other files in 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 trying configure tracker googleservice-info.plist.

    var configureerror:nserror?     gglcontext.sharedinstance().configurewitherror(&configureerror)     if configureerror != nil {         println("error configuring google context: \(configureerror)")     } 

but shows error used of unresolved identifier gglcontext

i not sure part missing.

thanks in advance :)

google bit slow support cocopods has been resolved, now. tricky bit know version of google analytics pod use there @ least 3 different ones, 2 of authored google themselves. using ga using cocoapods should using 1 officially recommend using, listed here: https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift

as of writing pod pod 'google/analytics' - using ga should work without additional effort , without directly embedding libraries code. additionally only thing need in bridging header this:

#import <google/analytics.h>

for detailed explanation of why there may different pods , 1 use, see video: https://www.youtube.com/watch?v=jqjd7qywh5k


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -