fix: deprecate defaultTracking and add autocapture#204
Merged
PouriaAmini merged 9 commits intoamplitude:feature-autocapturefrom Aug 2, 2024
PouriaAmini:deprecate-default-tracking
Merged
fix: deprecate defaultTracking and add autocapture#204PouriaAmini merged 9 commits intoamplitude:feature-autocapturefrom PouriaAmini:deprecate-default-tracking
PouriaAmini merged 9 commits intoamplitude:feature-autocapturefrom
PouriaAmini:deprecate-default-tracking
Conversation
Mercy811
approved these changes
Jul 30, 2024
Collaborator
Mercy811
left a comment
There was a problem hiding this comment.
Thanks Pouria for the PR. It looks good to me to use a convenience initializer with config.defaultTracking to keep supporting the interface so that existing customers are not affected, while new customers can use the updated initializer with config.autocapture directly.
crleona
reviewed
Jul 30, 2024
Examples/AmplitudeObjCExample/AmplitudeObjCExample/AppDelegate.m
Outdated
Show resolved
Hide resolved
crleona
reviewed
Aug 2, 2024
crleona
approved these changes
Aug 2, 2024
Comment on lines
+35
to
+52
| public static func sessions() -> ObjCAutocaptureOptions { | ||
| return ObjCAutocaptureOptions(options: .sessions) | ||
| } | ||
|
|
||
| @objc | ||
| public static func appLifecycles() -> ObjCAutocaptureOptions { | ||
| return ObjCAutocaptureOptions(options: .appLifecycles) | ||
| } | ||
|
|
||
| @objc | ||
| public static func screenViews() -> ObjCAutocaptureOptions { | ||
| return ObjCAutocaptureOptions(options: .screenViews) | ||
| } | ||
|
|
||
| @objc | ||
| public static func elementInteractions() -> ObjCAutocaptureOptions { | ||
| return ObjCAutocaptureOptions(options: .elementInteractions) | ||
| } |
Collaborator
There was a problem hiding this comment.
any reason to have these as functions vs static lets?
yuhao900914
reviewed
Aug 2, 2024
yuhao900914
approved these changes
Aug 2, 2024
PouriaAmini
added a commit
that referenced
this pull request
Aug 8, 2024
* feat: add user interactions capture (#190) * Fix indentation issue * feat: add user interactions capture * fix: fix typo * fix: remove support for UITextField action message capture * refactor: add dispatch once for method swizzling * fix: remove support for UISlider to reduce noise * feat: add support for UITextField and UISlider event capture * style: remove return keyword for one line functions * fix: fix typo * feat: add support for text field gained/lost focus * fix: fix lint * fix: remove tag as textfield title * refactor: refactor title and shouldTrack * refactor: add a protocol to track control elements * feat: add support for uitextview autocapture (#195) * Fix indentation issue * feat: add user interactions capture * fix: fix typo * fix: remove support for UITextField action message capture * refactor: add dispatch once for method swizzling * fix: remove support for UISlider to reduce noise * feat: add support for UITextField and UISlider event capture * style: remove return keyword for one line functions * fix: fix typo * feat: add support for text field gained/lost focus * fix: fix lint * fix: remove tag as textfield title * refactor: refactor title and shouldTrack * refactor: add a protocol to track control elements * refactor: guard on action name * feat: add support for uitextview capture * fix: disable action method tracking support for UITextView * fix: fix lint issue * style: remove amp_ prefix from objc methods * feat: add support for gesture recognizer autocapture (#196) * Fix indentation issue * feat: add user interactions capture * fix: fix typo * fix: remove support for UITextField action message capture * refactor: add dispatch once for method swizzling * fix: remove support for UISlider to reduce noise * feat: add support for UITextField and UISlider event capture * style: remove return keyword for one line functions * fix: fix typo * feat: add support for text field gained/lost focus * fix: fix lint * fix: remove tag as textfield title * refactor: refactor title and shouldTrack * refactor: add a protocol to track control elements * refactor: guard on action name * feat: add support for uitextview capture * fix: disable action method tracking support for UITextView * fix: fix lint issue * style: remove amp_ prefix from objc methods * feat: add support for gesture recognizers autocapture * fix: fix lint issue * fix: exclude unsupported gestures in tvos * fix: track touchupinside and valuechanged only (#199) * fix: just track touchupinside and valuechanged for some elements * fix: fix tvos issue * feat: capture control events for autocapture (#202) * fix: just track touchupinside and valuechanged for some elements * fix: fix tvos issue * feat: capture control events * fix: remove row selected event * fix: track touchUpInside for any element (#203) * fix: just track touchupinside and valuechanged for some elements * fix: fix tvos issue * feat: capture control events * fix: remove row selected event * fix: track any touchUpInside * fix: capture image name as a fallback for buttons title * fix: deprecate defaultTracking and add autocapture (#204) * fix: deprecate defaultTracking and add autocapture * fix: fix schema for the new test * fix: fix typo * fix: fix typo * fix: support optionset for autocapture options * fix: fix autocaptureoptions test * fix: fix failing test * fix: simplified the logic to deprecate defaultTracking * style: make autocapture options for objc as properties * fix: disable swiftui support for autocapture (#206) * fix: disable swiftui support for autocapture * fix: disable support for swiftui gesture recognizers autocapture * fix: fix typo * fix: filter scrolls for scrollable views * fix: imporve support for swiftui * fix: track screen name autocapture (#207) * fix: change element viewController to screenName * fix: remove title since it's already captured by screenName * fix: track changes to defaultTracking after initialization (#208) * fix: track changes to defaultTracking after initialization * fix: replace defaultTracking with autocapture if changed * fix: fix typo * fix: fix nit * style: rename parameter name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR deprecates the
defaultTrackingofConfigurationof the SDK and addsautocaptureas a replacement.Checklist