I would like to add the Google Analytics iOS SDK to my project but unfortunately it doesn't work. I'm not using Cocoa Pods, maybe that's the problem because Google says use it in the tutorial, but I can't use it in this project because of other reasons.
So that's how I tried:
GoogleService-info.plist
GoogleAnalytics/Library
folder to my project and the libGoogleAnalyticsServices.a
fileThen I added this to my AppDelegate.m
#import <Google/Analytics.h>
//...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Configure tracker from GoogleService-Info.plist.
NSError *configureError;
[[GGLContext sharedInstance] configureWithError:&configureError];
NSAssert(!configureError, @"Error configuring Google services: %@", configureError);
return YES;
}
It's exactly from the tutorial, but when I try to run it I get an error that Google/Analytics.h file not found
. I would really appreciate if somebody could tell me what's the problem, or somebody could explain me how can I setup the whole thing without cocoa pods (which files should I add from the zip.)
I was looking for the exact same thing just now. I found this very simple tutorial, it worked for me. Let me know if you need more help on this.