davide-scalzo / react-native-mixpanel

A React Native wrapper for Mixpanel tracking
MIT License
455 stars 195 forks source link

Implement new method to enable app session customization on iOS #133

Closed andrejunges closed 6 years ago

andrejunges commented 6 years ago

Related to https://github.com/davodesign84/react-native-mixpanel/issues/132

I don't have any experience with Objective C, so probably there are better ways to implement this functionality. @davodesign84 it'd be great if you could take a look on it.

ghost commented 6 years ago

DeepCode found the following issues:

Critical: 0 Warning: 0 Info: 0

Priority breakdown:

Security Defect API Anomaly Rename Lint Info
Critical 0 0 0 0 0 0 0
Warning 0 0 0 0 0 0 0
Info 0 0 0 0 0 0 0

Most affected files:

File Critical Warning Info

See detailed analysis.

andrejunges commented 6 years ago

@davodesign84 any chance you get some time soon to take a look on this?

louismullie commented 4 years ago

@andrejunges Any pointers as to how this method should be called?

trickeyd commented 3 years ago

Yes is there any documentation for this? I am not at all hot on objective C I'm afraid.

trickeyd commented 3 years ago

Ah sorry - it is just in the docs for the js API. I thought this was something I had to call from within the obj c.

For anyone else that arrives here in a similar state of confusion:

iOS is from the JS:

// Allows control of the min/max sessions 
Mixpanel.setAppSessionPropertiesIOS({
  minimumSessionDuration: 20000,
  maximumSessionDuration: 90000,
});

Android is from the AndroidManifest.xml:

<meta-data android:name="com.mixpanel.android.MPConfig.MinimumSessionDuration"
    android:value="20000" />

<meta-data android:name="com.mixpanel.android.MPConfig.SessionTimeoutDuration"
    android:value="90000" />