Skip to content

Integration

Carthage

To integrate AppeliumFeedback SDK into your Xcode project using Carthage, add this like to your Cartfile:

binary "https://api.appelium.com/v1/sdkArchives/AppeliumFeedbackKit.json"

after that, simply run:

carthage update --platform tvOS --use-xcframeworks

Once it finishes, drag the AppeliumFeedbackKit.xcframework into your Xcode project.

Basic usage

Tip

Previously the framework name didn't have "Kit" suffix, but this was running into Swift ambiguous type lookup issue (SR-14195)

  1. Import AppeliumFeedbackKit in your app delegate

    import AppeliumFeedbackKit
    

  2. Add the following to your app delegate's application:didFinishLaunchingWithOptions: method:

    AppeliumFeedback.start(apiKey: <#api key#>, bugReporting: .enabled())
    

Enabling features

In the code above, we explained how simple it is to bootstrap bug reporting feature.

We believe that SDKs should be transparent and explicit about which features get enabled and when. For this reason we are making all the features off by default. Instead of going through documentation in order to find out how to disable something (which you never thought would be enabled in the first place), you can rest assured that with Appelium it is disabled unless you have explicitly enabled it 👍.

Nevertheless, lets examine other useful features that you can enable and how to pass more configuration parameters:

AppeliumFeedback.start(
    apiKey: <#api key#>,
    bugReporting: .enabled(),
    crashReporting: .enabled(),
    errorReporting: .enabled(),
    networkMonitoring: .enabled,
    sessionMonitoring: .enabled,
    performanceTraces: .enabled
)

Session monitoring measures foreground session duration. Background launches and time spent in the background do not contribute to session-duration metrics. Background diagnostics can still be collected for other enabled features. Disabling session monitoring disables session-duration metrics in both states.

Use AppeliumFeedback.isRunningAppeliumTests to check whether the current process is running as part of an Appelium UI test run.

Simulator and debugger

To keep production metrics representative, AppeliumFeedback automatically suppresses some features during development, even when they are enabled:

  • Simulator: session monitoring and performance traces are disabled. Crash reporting, error reporting and network monitoring still work.
  • Debugger attached: crash reporting, error reporting, network monitoring, session monitoring and performance traces are all disabled, and no diagnostics are uploaded. Data recorded in earlier runs without a debugger is uploaded on the next launch without one.

Bug reporting is not affected.

Some features, like bug reporting allow more granular controls, e.g:

AppeliumFeedback.start(
    apiKey: <#api key#>,
    bugReporting: .enabled(
        screenshotsEnabled: true,
        screenRecording: .enabled()
    )
)

The default logs retention is 1 minute, and can be further customized using APIs:

AppeliumFeedback.configureLogsRetention(maxLifetime: 120, maxCount: 1_000)

Additionally, you can set the name and/or the version of the backend environment. This is very useful for network monitoring as it will allow you to compare network performance across different environments and different versions.

AppeliumFeedback.setApplicationEnvironment(name: "STAGING", version: "2.0")

You can obtain the api key in Dashboard under application specific settings.