Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up Debug mode for Mixpanel on iOS?

Tags:

ios

mixpanel

On the docs it says the following:

You can turn on Mixpanel logging by adding the following Preprocessor Macros in Build Settings: MIXPANEL_LOG=1 and MIXPANEL_DEBUG=1.

So that's what I did: enter image description here

But non of my events show up in the console :(

This is how I track events:

Mixpanel *mixpanel = [Mixpanel sharedInstance];
[mixpanel track:@"TEST"];
like image 410
espitia Avatar asked Jan 09 '23 21:01

espitia


2 Answers

I belive you are using CocoaPods to install the Mixpanel library. In this case, the library is actually compiled separately before it is included in your project. You need to open the Pods project in your workspace and choose the Pods-Mixpanel target and set the preproccessor macros there, so that they are evaluated when the Mixpanel library compiles.

example

like image 54
Alex Hofsteede Avatar answered Jan 17 '23 19:01

Alex Hofsteede


Here's a fuller view for where the Mixpanel based preprocessor macros should be added:

enter image description here

like image 45
Andrew Thompson Avatar answered Jan 17 '23 17:01

Andrew Thompson