mixpanel / mixpanel-swift

Official iOS (Swift) Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
434 stars 234 forks source link

Possible error while checking radio access technology #421

Closed pash3r closed 3 years ago

pash3r commented 3 years ago

Hi! I was searching info about some crashes with CTTelephonyNetworkInfo and currentRadioAccessTechnology and found your fix for usage of deprecated property here https://github.com/mixpanel/mixpanel-swift/pull/369/commits/78e13f300e27a9a32bc51bcb5d97a8efde503fbc

If I understand correctly your code, you iterate all over the values of serviceCurrentRadioAccessTechnology dictionary and if they have length bigger than 0, you collect it to the variable radio. But if there are more than 1 value in that dictionary, you override previous value in that radio property instead of concatenating them (I thought about concatenation because I saw a comma in pattern at line 673).

zihejia commented 3 years ago

Hi @pash3r, we realized this error a bit later already(https://github.com/mixpanel/mixpanel-swift/blob/be0d9e645f021beef57bd3c450155f672c4c508d/Sources/MixpanelInstance.swift#L661) but thanks for pointing out. I'm closing this one now.