Recently has been busy version of the big change so I want to share the things did not write to blog today to share the use of the Friends of the Union statistics 1. Download SDK 2. Method Encapsulation 3. Call in the appropriate place
We set up a base class controller in the project Baseviewcontroller because then we put the statistical method into the subclass naturally has statistical function I don't write statistical methods specifically for a click event, but the basic truth is,
Create a class to write statistical methods that can be copied out using
#import <Foundation/Foundation.h>
@interface Umutils:nsobject
Configure Friend League
+ (void) umregister;///////need us to implement in Appdelegate [Umutils umregister];//Allies
Account Statistics
+ (void) Useraccountwithpuid: (NSString *) puid;////////incoming you want to count the account generally when the login is successful when the mobile phone number or user name in the
Page statistics are used in-(void) Viewwillappear: (BOOL) animated
+ (void) Beginlogpageview: (NSString *) pageName;
Page statistics are used in-(void) Viewwilldisappear: (BOOL) animated
+ (void) Endlogpageview: (NSString *) pageName;
Account does not send account content when exiting login
+ (void) userloginout;///////////call not send account information when exiting login
@end
Realize
#import "UMUtils.h"
#import <UMMobClick/MobClick.h>
@implementation Umutils
+ (void) umregister{
[Email protected] "You apply for the friend League Appkey";
[Email protected] "App Store";
[Mobclick startwithconfigure:umconfiginstance];
}
+ (void) Useraccountwithpuid: (NSString *) puid{
[Mobclick Profilesigninwithpuid:puid];
}
+ (void) Beginlogpageview: (NSString *) pagename{
[Mobclick Beginlogpageview:pagename];
}
+ (void) Endlogpageview: (NSString *) pagename{
[Mobclick Endlogpageview:pagename];
}
+ (void) userloginout{
[Mobclick Profilesignoff];
}
iOS Friends League stats