zevarito / mixpanel

Simple lib to track events in Mixpanel service. It can be used in any rack based framework.
MIT License
273 stars 84 forks source link

MixPanel singleton's telephonyInfo property never set #137

Closed WiesnerPeti closed 9 years ago

WiesnerPeti commented 9 years ago

Hi,

sorry if this was raised before. I just saw in the code of the MixPanel singleton, that the telephonyInfo object is used in the currentRadio getter, but it's never initialised (always nil). (Version 2.5.4).

In the file MixPanel.m: Property declaration is at Line 59. property (nonatomic, strong) CTTelephonyNetworkInfo *telephonyInfo;

Usage is at Line 336 in currentRadio getter: _NSString *radio = telephonyInfo.currentRadioAccessTechnology;

At Line 352 a local CTTelephonyNetworkInfo is created, but only used for carrier informations.

Am I missing something, is it set elsewhere?

If not, it would be a cool thing to init it in: - (instancetype)initWithToken:(NSString )apiToken launchOptions:(NSDictionary )launchOptions andFlushInterval:(NSUInteger)flushInterval

and use it at Line 336 and 352.