Don’t track Mixpanel events for debug ios builds

Developing a new app I didn’t want to pollute my analytics data in mixpanel with development / test data.  So I wanted a clean way to be able to separate the test data with the release data.  “Not” tracking anything when in development mode was an option but I kinda wanted to be testing this as well … making sure I was always tracking the right things.  At the same time, I also wanted to be able to blow away the metrics from development really easily.  You hit Mixpanels 500K free events surprisingly quickly.

So a drop dead simple way to do this was to create two different Mixpanel projects – one for release, and the other for debugging.

Then in your ios AppDelegate.m you can simply use the appropriate key based on what mode you’re in.

#ifdef DEBUG
@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    //Other stuff
    [Mixpanel sharedInstanceWithToken:MIXPANEL_TOKEN];
    return YES;

Now that I’ve done that, my development analytics data is nicely partitioned in one place (so I know things are working), and it’s easy to delete.

Pair programming for anyone wanting to learn how to program an iOS app

In the hours in the day I have to program recently, I’ve been writing Python / Django.  And man do I miss my objective C / iOS.

So I’m gonna run a little experiment starting next wednesday May 15, 2013 by committing Wednesday evenings to hack on an iOS app for Zenlike and invite anyone looking to learn iOS programming to join me for some pair programming.  “Pair programming” … could mostly be me programming and describing what I’m doing.

That time … probably would be better spent hacking on the main service, learning more NLP, blogging, or any of the other “non-programming” tasks that I’m feeling myself increasingly occupied with starting Zenlike.  But I love iOS, want to keep those skills sharp, have a few interesting ideas for Zenlike apps, and want to continue to meet awesome smart people in Edmonton and San Francisco.

So … if you’re from Edmonton or SF and looking to learn a little iOS … ping me on twitter @dquail and we’ll plan to meet up at a coffee shop / Startup Edmonton or other for one of these Wednesday nights.  You don’t need much … but  a bit of programming experience would probably be wise.

* Edit – Lawyers will probably force me to get you to sign some silly doc re: ownership of code to prevent potential weirdness.