rih*_*ihe 6 google-analytics objective-c ios google-analytics-sdk
我想将Google Analytics iOS SDK添加到我的项目中,但不幸的是它不起作用.我没有使用Cocoa Pods,也许这就是问题,因为谷歌说在教程中使用它,但由于其他原因我不能在这个项目中使用它.
这就是我尝试的方式:
GoogleService-info.plistGoogleAnalytics/Library文件夹添加到我的项目和libGoogleAnalyticsServices.a文件中然后我把它添加到我的 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;
}
Run Code Online (Sandbox Code Playgroud)
它完全来自教程,但是当我尝试运行它时,我得到一个错误Google/Analytics.h file not found.我真的很感激,如果有人能告诉我这是什么问题,或者有人可以解释我如何设置没有可可豆荚的整个东西(我应该从拉链中添加哪些文件.)
| 归档时间: |
|
| 查看次数: |
6498 次 |
| 最近记录: |