[iOS] Statistics new lot methods

This commit is contained in:
Kirill Zhdanovich 2013-04-29 15:41:55 +03:00 committed by Alex Zolotarev
parent 25c4333bca
commit 39e6fe2342
2 changed files with 21 additions and 0 deletions

View file

@ -4,6 +4,9 @@
- (void) startSession;
- (void) stopSession;
- (void) logEvent:(NSString *)eventName;
- (void) logEvent:(NSString *)eventName withParameters:(NSDictionary *)parameters;
- (void) logProposalReason:(NSString *)reason withAnswer:(NSString *)answer;
+ (id) instance;

View file

@ -14,6 +14,24 @@
{
}
- (void) logEvent:(NSString *)eventName
{
[Flurry logEvent:eventName];
}
- (void) logEvent:(NSString *)eventName withParameters:(NSDictionary *)parameters
{
[Flurry logEvent:eventName withParameters:parameters];
}
- (void)logProposalReason:(NSString *)reason withAnswer:(NSString *)answer
{
NSDictionary * dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects: answer, nil]
forKeys:[NSArray arrayWithObjects: @"Answer", nil]];
NSString * screen = [NSString stringWithFormat:@"Open AppStore With Proposal on %@", reason];
[[Statistics instance] logEvent:screen withParameters:dict];
}
+ (Statistics *) instance
{
static Statistics* instance = nil;