amplitude / amplitude/Amplitude-Swift

Autocapture ElementInteractions [Amplitude] Screen Name is incorrect

Open
#255 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Swift
Stars
82
Forks
45
Avg merge
8h 54m
Merged PRs (30d)
7

Description

## Expected Behavior

I have a TableView whose cells have a TapGestureRecognizer. When using Autocapture ElementInteractions, I expect that the Screen Name property should be populated with the Title of the screen's view controller.

## Current Behavior

I am seeing the class name of my TableViewController as the Screen Name.

I created a minimally reproducible sample (attached), which is showing similar but additional issues. Clicking on buttons both within the nested TableViewController and in the page's View Controller, outside the nested TableViewController logs title of nested TableViewController ("Table View Controller") as the Screen Name and not "Main Page"

## Possible Solution

## Steps to Reproduce

1. Open attached project, change api key
2. Run app, click both buttons
3. Open Amplitude, view [Amplitude] Element Interacted events
4. [Amplitude] Screen Name is incorrect

## Environment
- SDK Version: 1.11.2
- OS Info: Xcode 16.2

Image

[storyboardApp.zip](https://github.com/user-attachments/files/18441915/storyboardApp.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.