Skip to content

Commit 2646c56

Browse files
authored
fix(docs): note on SwiftUI autocapture (#14203)
1 parent bd781c2 commit 2646c56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contents/docs/libraries/ios/_snippets/autocapture.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PostHog autocapture automatically tracks the following events for you:
99
- **$screen** - when the user navigates (if using `UIViewController`)
1010
- **$autocapture** - when the user interacts with elements in a screen (if using `UIKit`)
1111

12-
> 🚧 **Note:** `$autocapture` is currently supported only in UIKit.
12+
> 🚧 **Note:** `$autocapture` captures interactions with UIKit elements. Some SwiftUI views use UIKit under the hood (e.g., `TextField``UITextField`, `Toggle``UISwitch`) and will also be autocaptured.
1313
1414
### Capturing screen views
1515

@@ -79,7 +79,7 @@ var body: some View {
7979
}
8080
```
8181

82-
In this example, interactions with the _underlying_ UITextField will be captured with an additional identifier "usernameTextField".
82+
Since SwiftUI's `TextField` uses `UITextField` under the hood, interactions with it will be autocaptured with the additional identifier "usernameTextField".
8383

8484
**Example of generated analytics data**
8585

0 commit comments

Comments
 (0)