mixpanel / mixpanel-iphone

Official iOS (Objective-C) Tracking Library for Mixpanel Analytics
http://mixpanel.com
Apache License 2.0
1.05k stars 564 forks source link

Expose flushInterval with (Mixpanel *)sharedInstanceWithToken method #911

Closed lorenc-tomasz closed 3 years ago

lorenc-tomasz commented 4 years ago

When using + (Mixpanel *)sharedInstanceWithToken:(NSString *)apiToken launchOptions:(NSDictionary *)launchOptions trackCrashes:(BOOL)trackCrashes automaticPushTracking:(BOOL)automaticPushTracking optOutTrackingByDefault:(BOOL)optOutTrackingByDefault flushInterval param is set either to 1 or to 60 seconds if no instace is exist. Maybe it's good to consider exposing this param on that methids?

zihejia commented 3 years ago

Hi @lorenc-tomasz , Sorry for the late response. you can use initWithToken:launchOptions:flushInterval:trackCrashes: or set flushInterval after calling sharedInstance. like self.mixpanel.flushInterval = 20;