Error while Google Analytics integration iOS
I need to add google analytics to my iOS App,
I have implemented this 3 steps.
Step 1: Downloaded google analytics Library file and added this files to
project,
GAI.h
GAITracker.h
GAITrackedViewController.h -GAIDictionaryBuilder.h
GAIFields.h
GAILogger.h
libGoogleAnalyticsServices.a
CoreData.framework
SystemConfiguration.framework
libz.dylib
Step 2: Added this code in didFinishLaunchingWithOptions
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GAI sharedInstance].trackUncaughtExceptions = YES;
[GAI sharedInstance].dispatchInterval = 20;
[[[GAI sharedInstance] logger] setLogLevel:kGAILogLevelVerbose];
[[GAI sharedInstance] trackerWithTrackingId:@"UA-XXXX-Y"];
}
Step 3: For example, suppose you have a "Home Screen" view that you want
to measure with a view controller header that looks like this:
@interface HomeViewController : UIViewController
I have updated this header to:
#import "GAITrackedViewController.h"
@interface HomeViewController : GAITrackedViewController
after doing this i am getting Error like,
duplicate symbol _OBJC_CLASS_$_GAIUtil in:
/Users/Supriya/Desktop/BTS
2.0/BTS/BTS/Library/libGoogleAnalytics_debug.a(GAIUtil.o)
/Users/Supriya/Desktop/BTS
2.0/BTS/BTS/Library/libGoogleAnalyticsServices.a(GAIUtil.o)
duplicate symbol _OBJC_METACLASS_$_GAIUtil in:
/Users/Supriya/Desktop/BTS
2.0/BTS/BTS/Library/libGoogleAnalytics_debug.a(GAIUtil.o)
/Users/Supriya/Desktop/BTS
2.0/BTS/BTS/Library/libGoogleAnalyticsServices.a(GAIUtil.o)
duplicate symbol _OBJC_CLASS_$_GAIDefaultLogger in:
/Users/Supriya/Desktop/BTS
2.0/BTS/BTS/Library/libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
/Users/Supriya/Desktop/BTS
2.0/BTS/BTS/Library/libGoogleAnalyticsServices.a(GAIDefaultLogger.o)
duplicate symbol _OBJC_IVAR_$_GAIDefaultLogger._logLevel in:
/Users/Supriya/Desktop/BTS
2.0/BTS/BTS/Library/libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
/Users/Supriya/Desktop/BTS
2.0/BTS/BTS/Library/libGoogleAnalyticsServices.a(GAIDefaultLogger.o)
duplicate symbol _OBJC_METACLASS_$_GAIDefaultLogger in:
/Users/Supriya/Desktop/BTS
2.0/BTS/BTS/Library/libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
/Users/Supriya/Desktop/BTS
2.0/BTS/BTS/Library/libGoogleAnalyticsServices.a(GAIDefaultLogger.o)
EDIT: I have added this frameworks and Library in my projects which i told
you above. : Where i am doing mistake ? please help
Thanks in advance.
No comments:
Post a Comment