Skip to content

Instantly share code, notes, and snippets.

@badeen
Created October 11, 2012 23:20
Show Gist options
  • Save badeen/3876259 to your computer and use it in GitHub Desktop.
Save badeen/3876259 to your computer and use it in GitHub Desktop.
MixPanel iOS problems
Actual API Problems
- It raises an exception when you pass in an empty string for sharedInstanceWithToken. This is just a horrible practice. I had previously been using an empty string so that I wouldn't track data from our test server/app. NEVER EVER RAISE AN EXCEPTION. Just NSLog it and return nil if you must.
- It raises an exception when calling sharedInstance before sharedInstanceWithToken. NEVER EVER RAISE AN EXCEPTION. Just NSLog it and return nil if you must.
- I see no good reason to have a separate object and methods for MixpanelPeople. This seems like some sort of weird name spacing attempt or something like that. This is not done in Objective-C. It is wrong.
- set:to: and set: are horrible, horrible method names. Just read the Objective-C coding guidelines by Apple. This is just plain wrong.
- The defines like DebugLog need to use an #ifndef. DebugLog is a commonly used thing by developers and you are attempting to redefine it. Be a good citizen and don't do that.
Doc Problems
- There is no identifyUser: method. It is identify:
- This is not valid Objective-C (and if it is, nobody ever does it) [mixpanel.people.set:@"Pet" to:@"Dog"];. It should be [mixpanel.people set:@"Pet" to:@"Dog"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment