General
API
Language libraries
External Services
Other
Track Stats with Objective-C in iPhone, iPad, and Mac Apps
1. Download StatHat.h and StatHat.m from github
and put them in your project. There are no other dependencies.
2. Include the header file in your code:
#import "StatHat.h"
3. Make calls to StatHat. You do not need to create the stats first
using the web interface.
- (void)sendMessage:(NSString*)content toUser:(User*)recipient fromUser:(User*)sender
{
[self deliver:content to:recipient from:sender];
if ([sender isFemale] && [recipient isMale]) {
_sh = [StatHat postEZStat:@"messages sent - female to male" withCount:1.0
forUser:@"YOUR_EZKEY" delegate:self];
}
}
4. Go to the stats page to see your stats!