Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Feature Autocapture #209

Merged
merged 11 commits into from
Aug 8, 2024
Merged

feat: Feature Autocapture #209

merged 11 commits into from
Aug 8, 2024

Conversation

PouriaAmini
Copy link
Contributor

@PouriaAmini PouriaAmini commented Aug 8, 2024

Summary

This PR deprecates the defaultTracking option of the Configuration class and adds the autocapture option. It also adds user interaction tracking with UIControl elements and UIGestureRecognizer objects in UIKit applications. To enable this option, include AutocaptureOptions.elementInteractions in the autocapture configuration.

New Autocapture configuration

let amplitude = Amplitude(configuration: Configuration(
    apiKey: "API_KEY",
    autocapture: [.sessions, .appLifecycles, .screenViews, .elementInteractions]
))
AMPConfiguration* configuration = [AMPConfiguration initWithApiKey:@"API_KEY"];
configuration.autocapture = [[AMPAutocaptureOptions alloc] initWithOptionsToUnion:@[
    AMPAutocaptureOptions.sessions,
    AMPAutocaptureOptions.appLifecycles,
    AMPAutocaptureOptions.screenViews,
    AMPAutocaptureOptions.elementInteractions
]];
Amplitude* amplitude = [Amplitude initWithConfiguration:configuration];

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

PouriaAmini and others added 11 commits July 12, 2024 14:22
* 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
* 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
* 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: just track touchupinside and valuechanged for some elements

* fix: fix tvos issue
* fix: just track touchupinside and valuechanged for some elements

* fix: fix tvos issue

* feat: capture control events

* fix: remove row selected event
* 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

* 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

* fix: disable support for swiftui gesture recognizers autocapture

* fix: fix typo

* fix: filter scrolls for scrollable views

* fix: imporve support for swiftui
* fix: change element viewController to screenName

* fix: remove title since it's already captured by screenName
* fix: track changes to defaultTracking after initialization

* fix: replace defaultTracking with autocapture if changed

* fix: fix typo

* fix: fix nit

* style: rename parameter name
@PouriaAmini PouriaAmini changed the title Feature Autocapture feat: Feature Autocapture Aug 8, 2024
@PouriaAmini PouriaAmini merged commit 4ab5673 into main Aug 8, 2024
5 of 6 checks passed
@PouriaAmini PouriaAmini deleted the feature-autocapture branch August 8, 2024 17:50
github-actions bot pushed a commit that referenced this pull request Aug 8, 2024
# [1.8.0](v1.7.0...v1.8.0) (2024-08-08)

### Features

* Feature Autocapture ([#209](#209)) ([4ab5673](4ab5673)), closes [#190](#190) [#195](#195) [#196](#196) [#199](#199) [#202](#202) [#203](#203) [#204](#204) [#206](#206) [#207](#207) [#208](#208)
Copy link

github-actions bot commented Aug 8, 2024

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants