当我尝试添加代码时,我会收到语义和解析问题。有谁知道我可以将这个添加到我的应用程序的正确方法?
第一组代码是我没有分析的原始代码,下一组代码是告诉我放入我的应用程序的代码。任何人都可以提出我可以尝试的一组代码吗?
原始代码
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
(NSDictionary *)launchOptions
{
CGRect frame = [[UIScreen mainScreen] bounds];
myWindow = [[UIWindow alloc] initWithFrame: frame];
if (myWindow)
{
UIImageView *newView = [[UIImageView alloc] initWithFrame: frame];
if (newView)
{
UIImage *image = [UIImage imageNamed: @"Launch.png"];
if (image)
{
[newView setImage: image];
}
[newView setUserInteractionEnabled: YES];
UIGestureRecognizer *newRecognizer = [[UITapGestureRecognizer alloc] initWithTarget: self action: @selector(refresh)];
if (newRecognizer)
{
[newView addGestureRecognizer: newRecognizer];
[newRecognizer release];
}
[myWindow addSubview: newView];
[newView release];
}
[myWindow makeKeyAndVisible];
myModel = [[NBSHomeModel alloc] init];
[myModel setDelegate: self];
[myModel reload];
}
return YES;
}
以下是Flurry说明中的代码
#import "Flurry.h"
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
[Flurry startSession:@"YOUR_API_KEY"];
//your code
}
答案 0 :(得分:0)
你需要在Flurry中创建帐户,然后你就拥有你的乱舞 API_KEY 的ID。
现在我只是从波纹链接下载一个Zip文件: -
http://www.sendspace.com/file/y9nqcl
在这个Zip中你有两个文件夹
<强> FlurryAnalytics 强>
<强> FlurryAppCircle 强>
将两者添加到您的项目中。
现在在您的AppDelegate.m中导入此#import "FlurryAnalytics.h"
并在didFinishLaunchingWithOptions
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[FlurryAnalytics startSession:@"YOR_API_KEY"];
}
注意: - 其反映在乱舞网站的应用分析可能需要一段时间来显示图形