Skip to content

Remove Decide and make trackAutomaticEvents required parameter - #545

Merged
jaredmixpanel merged 14 commits into
masterfrom
jared-deprecate-decide
Aug 16, 2022
Merged

jaredmixpanel merged 14 commits into
masterfrom
jared-deprecate-decide

Conversation

@jaredmixpanel

Copy link
Copy Markdown
Contributor

No description provided.

@jaredmixpanel jaredmixpanel changed the title [WIP] remove decide and make trackAutomaticEvents required Remove Decide and make trackAutomaticEvents required parameter Jun 22, 2022
@jaredmixpanel
jaredmixpanel requested a review from zihejia June 22, 2022 22:12
Comment thread Mixpanel-swift.podspec Outdated
s.subspec 'Complete' do |ss|
ss.ios.pod_target_xcconfig = {
'OTHER_SWIFT_FLAGS' => '$(inherited) -D DECIDE'
'OTHER_SWIFT_FLAGS' => '$(inherited) -D AUTOMATIC_EVENTS'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove this flag and only reply on the setting from init?

@jaredmixpanel jaredmixpanel Jun 22, 2022 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had done that originally and it caused all kinds of build problems since it's used to conditionally exclude the AutomaticEvents code from compilation in the macOS and watchOS Targets. Maybe we could remove it and do that some other way. But this seemed the simplest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced with #if os(iOS) || os(tvOS)

Comment thread Sources/Track.swift Outdated
@@ -22,7 +22,10 @@ class Track {
weak var mixpanelInstance: MixpanelInstance?

var isAutomaticEventEnabled: Bool {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this function can be removed for simplicity.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@zihejia zihejia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jaredmixpanel
jaredmixpanel merged commit 65b1a9c into master Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants