Pendo and SwiftUI

Last Updated:

This article details how Pendo supports iOS applications written with SwiftUI.

SwiftUI is based on declarative programming, meaning the developer declares what they want to build and SwiftUI generates it, as opposed to UIKit, where the developer explicitly says what and how to build. This means that as SwiftUI develops, there may be changes in how things are built. This will break compatibility as our tracking is based on specific information that currently exists.

SwiftUI was introduced with iOS 13. Pendo works best with iOS 15-16. For iOS lower than 15, we cannot identify features, and there will be limitations on identifying pages.

Important: Using the SwiftUI beta SDK might impact the performance of your application when navigating between screens in the app, depending on how it is structured

Tagging Pages

Pendo supports pages written with SwiftUI only under the following condition:

  • The view the developer is presenting is wrapped in SwiftUI navigation API.

Tagging Features

Pendo allows users to tag only clickable features, that is, features the end user can tap on.

Customers can only get analytics for the following:

  • SwiftUI label/text features.
  • SwiftUI images - Pendo collects the image name when the image is a part of the app (not dynamic).
    Note: System images (sfsymbols) are not supported.
  • SwiftUI buttons:
    • Button with text/”role” - customers must tag the text to get analytics. Tagging the button itself results in no analytics.
    • Button with image and text - customers must tag the image and the text. When users click the image, the analytics are sent separately from when users click the text. Customers need to aggregate the clicks from both elements to get a complete view.
    • Button with padding - buttons that have padding may not be recognized as taggable even though they will be recognized as clickable. As a workaround, add color to the padding, which should resolve this.
  • SwiftUI lists - Lists are currently supported by an index path, meaning if a feature is sometimes located in different areas (getting different index) due to different user roles or permissions, for example, Pendo is not able to track its analytics accurately.

Note: SwiftUI features that are loaded dynamically are not supported.


Was this article helpful?
0 out of 0 found this helpful