diff --git a/MixpanelDemo/MixpanelDemo.xcodeproj/xcshareddata/xcschemes/MixpanelDemoWatch (Notification).xcscheme b/MixpanelDemo/MixpanelDemo.xcodeproj/xcshareddata/xcschemes/MixpanelDemoWatch (Notification).xcscheme index c59d330b..fd96ecdd 100644 --- a/MixpanelDemo/MixpanelDemo.xcodeproj/xcshareddata/xcschemes/MixpanelDemoWatch (Notification).xcscheme +++ b/MixpanelDemo/MixpanelDemo.xcodeproj/xcshareddata/xcschemes/MixpanelDemoWatch (Notification).xcscheme @@ -55,10 +55,8 @@ debugServiceExtension = "internal" allowLocationSimulation = "YES" launchAutomaticallySubstyle = "8"> - + - + - + - - - - - + diff --git a/MixpanelDemo/MixpanelDemo.xcodeproj/xcshareddata/xcschemes/MixpanelDemoWatch.xcscheme b/MixpanelDemo/MixpanelDemo.xcodeproj/xcshareddata/xcschemes/MixpanelDemoWatch.xcscheme index 48984293..c525f754 100644 --- a/MixpanelDemo/MixpanelDemo.xcodeproj/xcshareddata/xcschemes/MixpanelDemoWatch.xcscheme +++ b/MixpanelDemo/MixpanelDemo.xcodeproj/xcshareddata/xcschemes/MixpanelDemoWatch.xcscheme @@ -54,10 +54,8 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> - + - + - + - - - - - + diff --git a/Sources/MixpanelInstance.swift b/Sources/MixpanelInstance.swift index 660f37fe..72500a1f 100644 --- a/Sources/MixpanelInstance.swift +++ b/Sources/MixpanelInstance.swift @@ -666,7 +666,7 @@ extension MixpanelInstance { - parameter completion: an optional completion handler for when the createAlias has completed. This should only be set to false if you wish to prevent people profile updates for that user. */ - open func createAlias(_ alias: String, distinctId: String, usePeople: Bool = true, completion: (() -> Void)? = nil) { + open func createAlias(_ alias: String, distinctId: String, usePeople: Bool = true, createUserProfile: Bool = true, completion: (() -> Void)? = nil) { if hasOptedOutTracking() { if let completion = completion { DispatchQueue.main.async(execute: completion) @@ -731,7 +731,9 @@ extension MixpanelInstance { let properties = ["distinct_id": distinctId, "alias": alias] track(event: "$create_alias", properties: properties) - identify(distinctId: distinctId, usePeople: usePeople) + if createUserProfile { + identify(distinctId: distinctId, usePeople: usePeople) + } flush(completion: completion) } else { Logger.error(message: "alias: \(alias) matches distinctId: \(distinctId) - skipping api call.")