Skip to content

Commit e77579d

Browse files
authored
Merge pull request #3 from DrimZ/fix/ios-typings
fix: mismatch superProperties type
2 parents 3d81097 + 1c499ea commit e77579d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ios/Plugin/MixpanelPlugin.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ public class MixpanelPlugin: CAPPlugin {
1414
let optOutTrackingByDefault = getConfig().getBoolean("optOutTrackingByDefault", false)
1515
let trackAutomaticEvents = getConfig().getBoolean("trackAutomaticEvents", true)
1616
let disableIpCollection = getConfig().getBoolean("disableIosIpCollection", false)
17-
let superProperties = getConfig().getObject("superProperties") ?? [:]
17+
let rawSuperProps = getConfig().getObject("superProperties") ?? [:]
18+
let superProperties = rawSuperProps.compactMapValues { $0 as? MixpanelType }
1819

1920
let instance = Mixpanel.initialize(
2021
token: token,
2122
trackAutomaticEvents: trackAutomaticEvents,
2223
optOutTrackingByDefault: optOutTrackingByDefault,
23-
serverURL: serverURL,
24-
superProperties: superProperties
24+
superProperties: superProperties,
25+
serverURL: serverURL
2526
)
2627
instance.useIPAddressForGeoLocation = !disableIpCollection
2728
}

0 commit comments

Comments
 (0)