=============== LIBRARY RULES =============== From library maintainers: - Install the iOS SDKs with Swift Package Manager: https://github.com/Appelium/AppeliumFeedback.git (product AppeliumFeedbackKit, app target) and https://github.com/Appelium/AppeliumTests.git (product AppeliumTestsKit, UI test target). - Install the Android SDKs from Maven Central, without an extra repository: com.appelium:feedback as implementation, and com.appelium:appelium-tests as androidTestImplementation. - On iOS, call AppeliumFeedback.start(apiKey:) once, on the main thread, as early as possible: in the initializer of the SwiftUI App or in application(_:didFinishLaunchingWithOptions:). - On Android, call AppeliumFeedback.start(apiKey = ..., application = this, ...) once, in onCreate of the Application class. - Every SDK feature is off until it is enabled in start, for example with bugReporting, crashReporting and errorReporting. - On iOS, start AppeliumTests in a class that the UI test bundle's Info.plist names as NSPrincipalClass, never in setUp(). - On Android, start AppeliumTests in a base test class with @get:Rule val appeliumTestWatcher = AppeliumTestWatcher(), and let every test class extend it. - Connect agents to the MCP server https://api.appelium.com/v1/mcp (streamable HTTP). Clients with MCP OAuth sign in in a browser; other clients send a personal API key in the X-Appelium-Token header. ### Simple XCTest UI test example Source: https://developer.appelium.com/engineering/snapshot-query/ Shows a basic UI test flow: verifying the welcome screen, starting registration, and verifying the registration screen. Uses XCUIApplication and XCTAssert functions. ```swift let app = XCUIApplication() // 1. Verify the welcome screen XCTAssertTrue(app.staticTexts["Welcome"].exists) XCTAssertTrue(app.buttons["Login"].exists) XCTAssertTrue(app.buttons["Register"].exists) // 2. Start the registration flow app.buttons["Register"].tap() // 3. Verify the registration screen XCTAssertTrue(app.staticTexts["Create an account"].exists) XCTAssertTrue(app.textFields["firstName"].exists) XCTAssertTrue(app.textFields["lastName"].exists) XCTAssertTrue(app.textFields["email"].exists) XCTAssertTrue(app.buttons["Submit"].exists) XCTAssertFalse(app.buttons["Submit"].isEnabled) ``` -------------------------------- ### Create UITestsSetup class to start AppeliumTests Source: https://developer.appelium.com/documentation/tests/ios/integration/ Create a class named UITestsSetup in your UI test target. The SDK is started in its init method using AppeliumTests.start(apiKey:). Optionally set the test execution environment with setTestExecutionEnvironment(name:version:). Start the SDK only from the principal class; calling start later from setUp() or setUpWithError() will not report anything. ```swift import XCTest import AppeliumTestsKit @MainActor final class UITestsSetup: NSObject { override init() { super.init() AppeliumTests.start(apiKey: "YOUR_API_KEY") // Optionally set the name and/or the version of the backend environment AppeliumTests.setTestExecutionEnvironment(name: "STAGING", version: "2.0") } } ``` -------------------------------- ### start(apiKey:performanceTraces:) Source: https://developer.appelium.com/documentation/feedback/tvos/performance-traces/ Initializes AppeliumFeedback with performance traces enabled. This also activates automatically collected traces such as the App Start trace. ```APIDOC ## start(apiKey:performanceTraces:) ### Description Initializes AppeliumFeedback with performance traces enabled. This also activates automatically collected traces such as the App Start trace. ### Method start ### Parameters - **apiKey** (String) - Required - Your API key. - **performanceTraces** (PerformanceTraces) - Required - Set to `.enabled` to enable performance traces. ### Request Example ```swift AppeliumFeedback.start( apiKey: "YOUR_API_KEY", performanceTraces: .enabled ) ``` ``` -------------------------------- ### Server-Timing header example Source: https://developer.appelium.com/documentation/network-monitoring/overview/ Example of a Server-Timing header with a single total entry in milliseconds, as recommended by W3C. Appelium reads the total entry. ```http Server-Timing: total;dur=100.2 ``` -------------------------------- ### AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/ios/performance-traces/ Starts the AppeliumFeedback SDK with performance traces enabled. This also enables the automatic App Start trace. ```APIDOC ## AppeliumFeedback.start ### Description Starts the AppeliumFeedback SDK with performance traces enabled. This also enables the automatic App Start trace. ### Method start ### Parameters - **apiKey** (String) - Required - Your API key. - **performanceTraces** (PerformanceTraces) - Required - Set to `.enabled` to enable performance traces. ### Request Example ```swift AppeliumFeedback.start( apiKey: "YOUR_API_KEY", performanceTraces: .enabled ) ``` ``` -------------------------------- ### Start AppeliumTests in UI test setup class Source: https://developer.appelium.com/documentation/tests/tvos/integration/ Start AppeliumTests from a class referenced by NSPrincipalClass in the UI test bundle's Info.plist. Replace YOUR_API_KEY with your actual API key. ```swift import AppeliumTestsKit @MainActor final class UITestsSetup: NSObject { override init() { super.init() AppeliumTests.start(apiKey: "YOUR_API_KEY") } } ``` -------------------------------- ### list_user_reviews JSON-RPC request example Source: https://developer.appelium.com/documentation/api/mcp/ Example JSON-RPC request to call the list_user_reviews tool with applicationId 42 and applicationVersion 3.4.1. The arguments object can be empty to fetch all workspace reviews, or include only store to filter by store. ```json { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "list_user_reviews", "arguments": { "applicationId": 42, "applicationVersion": "3.4.1" } } } ``` -------------------------------- ### Start AppeliumFeedback with API keys and bug reporting Source: https://developer.appelium.com/documentation/feedback/flutter/integration/ Call AppeliumFeedback.start once in main before runApp. Pass API keys for both platforms; the SDK uses the key of the platform the app runs on. Initializes the Flutter binding if none exists; call from the main isolate only. Crashes before start are not reported, and calls to other SDK methods before start are ignored (assertions in debug). A second call is ignored. ```dart import 'package:appelium_feedback/appelium_feedback.dart'; import 'package:flutter/material.dart'; void main() { AppeliumFeedback.start( apiKeys: const AppeliumApiKeys( ios: 'YOUR_IOS_API_KEY', android: 'YOUR_ANDROID_API_KEY', ), bugReporting: const BugReportingConfiguration.enabled(), ); runApp(const MyApp()); } ``` -------------------------------- ### AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/flutter/integration/ Starts the Appelium Feedback SDK with the provided configuration. The logsRetention parameter controls how long activity logs are kept for reports. ```APIDOC ## AppeliumFeedback.start ### Description Starts the Appelium Feedback SDK with the provided configuration. The logsRetention parameter controls how long activity logs are kept for reports. ### Method start ### Parameters #### Request Body - **apiKeys** (type) - Required - API keys for the SDK. - **crashReporting** (CrashReportingConfiguration) - Required - Configuration for crash reporting. - **logsRetention** (LogsRetentionConfiguration) - Optional - Configuration for log retention. ### Request Example ```dart AppeliumFeedback.start( apiKeys: apiKeys, crashReporting: CrashReportingConfiguration.enabled, logsRetention: const LogsRetentionConfiguration( maxLifetime: Duration(minutes: 5), maxCount: 2000, ), ); ``` ``` -------------------------------- ### AppeliumFeedback.reportFirstFrame() Source: https://developer.appelium.com/documentation/feedback/ios/performance-traces/ Reports the moment the first screen is shown. Use this when the SDK is started after the first screen appears, for example after user consent. Call on the main thread after start. ```APIDOC ## AppeliumFeedback.reportFirstFrame() ### Description Reports the moment the first screen is shown. Use this when the SDK is started after the first screen appears, for example after user consent. Call on the main thread after start. ### Method reportFirstFrame ### Notes - Call on the main thread, after `start`. - It is ignored once the first frame has been recorded, including by the SDK itself. ### Request Example ```swift AppeliumFeedback.reportFirstFrame() ``` ``` -------------------------------- ### Enable all Appelium features in start Source: https://developer.appelium.com/documentation/feedback/android/integration/ All features are off by default; calling start with only the API key does nothing. Enable each feature with its parameter of start. Console logs and network logs are recorded whenever the SDK is started and uploaded only as part of a bug, crash, or error report. ```kotlin AppeliumFeedback.start( apiKey = "YOUR_API_KEY", application = this, bugReporting = BugReportingConfiguration.Enabled(), crashReporting = CrashReportingConfiguration.Enabled, errorReporting = ErrorReportingConfiguration.Enabled, networkMonitoring = NetworkMonitoringConfiguration.Enabled, sessionMonitoring = SessionMonitoringConfiguration.Enabled, performanceTraces = PerformanceTracesConfiguration.Enabled ) ``` -------------------------------- ### Enable performance traces when starting the SDK Source: https://developer.appelium.com/documentation/feedback/tvos/performance-traces/ Enable performance traces when starting the SDK. This also activates automatically collected traces such as the App Start trace. Then start a trace with `startPerformanceTrace`. ```swift AppeliumFeedback.start( apiKey: "YOUR_API_KEY", performanceTraces: .enabled ) let trace = AppeliumFeedback.startPerformanceTrace(name: "loadHomeScreen") ``` -------------------------------- ### Start logging a request with logRequestStart Source: https://developer.appelium.com/documentation/feedback/android/network-logs/ Use for HTTP clients not integrated with Appelium. Call when the request starts and keep the returned token for later finish or error calls. ```kotlin import com.appelium.appelium_core.networking.HTTPHeaderField import com.appelium.appelium_core.networking.NetworkRequestMetrics import com.appelium.feedback.logRequestError import com.appelium.feedback.logRequestFinish import com.appelium.feedback.logRequestStart import com.appelium.feedback.recordNetworkRequestMetrics val token = AppeliumFeedback.logRequestStart( url = url, method = "POST", headers = listOf(HTTPHeaderField(name = "Content-Type", value = "application/json")), body = requestBody ) ``` -------------------------------- ### Start AppeliumFeedback in Application.onCreate Source: https://developer.appelium.com/documentation/feedback/android/integration/ Call AppeliumFeedback.start once, as early as possible, in onCreate of your Application class. Calls to other SDK functions before start are ignored. A second call to start is ignored with a warning in Logcat. ```kotlin import android.app.Application import com.appelium.feedback.AppeliumFeedback import com.appelium.feedback.configuration.BugReportingConfiguration class MyApplication : Application() { override fun onCreate() { super.onCreate() AppeliumFeedback.start( apiKey = "YOUR_API_KEY", application = this, bugReporting = BugReportingConfiguration.Enabled() ) } } ``` -------------------------------- ### Enable performance traces and start a trace Source: https://developer.appelium.com/documentation/feedback/android/performance-traces/ Enable performance traces when starting the SDK. This also activates automatically collected traces such as the App Start trace. Then start a trace with a descriptive name. ```kotlin AppeliumFeedback.start( apiKey = <#api key#>, application = this, performanceTraces = PerformanceTracesConfiguration.Enabled ) val trace = AppeliumFeedback.startPerformanceTrace(name = "loadHomeScreen") ``` -------------------------------- ### Set backend environment with AppeliumFeedback.setApplicationEnvironment Source: https://developer.appelium.com/documentation/feedback/flutter/integration/ Tells the SDK which backend is in use for network monitoring. Version is optional. Call after start and again when switching backends. ```dart AppeliumFeedback.setApplicationEnvironment(name: 'STAGING', version: '2.4.0'); ``` -------------------------------- ### Enable Appelium features with start(apiKey:) Source: https://developer.appelium.com/documentation/feedback/ios/integration/ All features are off by default; calling start(apiKey:) without any feature does nothing. Enable each feature via its parameter of start, as shown. ```swift AppeliumFeedback.start( apiKey: "YOUR_API_KEY", bugReporting: .enabled(), crashReporting: .enabled, errorReporting: .enabled, networkMonitoring: .enabled, sessionMonitoring: .enabled, performanceTraces: .enabled ) ``` -------------------------------- ### AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/android/integration/ Starts the Appelium Feedback SDK with the provided API key and configuration options. This method initializes the SDK and must be called before using other SDK features. ```APIDOC ## AppeliumFeedback.start ### Description Starts the Appelium Feedback SDK with the provided API key and configuration options. ### Method start ### Parameters - **apiKey** (String) - Required - Your Appelium API key. - **application** (Application) - Required - The application instance. - **crashReporting** (CrashReportingConfiguration) - Optional - Configuration for crash reporting. - **logsRetention** (LogsRetentionConfiguration) - Optional - Configuration for log retention. ### Request Example ```kotlin import kotlin.time.Duration.Companion.minutes AppeliumFeedback.start( apiKey = "YOUR_API_KEY", application = this, crashReporting = CrashReportingConfiguration.Enabled, logsRetention = LogsRetentionConfiguration(maxLifetime = 5.minutes, maxCount = 2_000) ) ``` ``` -------------------------------- ### Start AppeliumFeedback in UIKit AppDelegate Source: https://developer.appelium.com/documentation/feedback/ios/integration/ Call AppeliumFeedback.start once on the main thread as early as possible in the app launch. URLSession instances created before start are not captured, and calls to other SDK methods before start are ignored. A second call to start is ignored. ```swift import UIKit import AppeliumFeedbackKit @main class AppDelegate: UIResponder, UIApplicationDelegate { func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { AppeliumFeedback.start( apiKey: "YOUR_API_KEY", bugReporting: .enabled() ) return true } } ``` -------------------------------- ### Start AppeliumFeedback in SwiftUI App Source: https://developer.appelium.com/documentation/feedback/ios/integration/ Call AppeliumFeedback.start once on the main thread as early as possible in the app launch. URLSession instances created before start are not captured, and calls to other SDK methods before start are ignored. A second call to start is ignored. ```swift import SwiftUI import AppeliumFeedbackKit @main struct MyApp: App { init() { AppeliumFeedback.start( apiKey: "YOUR_API_KEY", bugReporting: .enabled() ) } var body: some Scene { WindowGroup { ContentView() } } } ``` -------------------------------- ### Get Build by ID - 200 OK Response Source: https://developer.appelium.com/documentation/api/builds/ Successful response for GET /v1/builds/:buildId. Returns build details including id, version, installUrl, and expirationDate. ```json { "data": { "id": 12345, "shortVersion": "3.2.0", "version": "38", "serialNumber": 36, "installUrl": "itms-services://?action=download-manifest&url=https://...", "minimumOsVersion": "11.0", "creationDate": "2019-10-05T19:23:40.305Z", "updateDate": "2019-10-05T19:23:40.305Z", "expirationDate": "2020-05-26T11:15:36.000Z" } } ``` -------------------------------- ### Start, add attributes, and stop a performance trace Source: https://developer.appelium.com/documentation/feedback/tvos/performance-traces/ Start a trace with a descriptive name, add custom attributes, and stop it when the operation finishes. `startPerformanceTrace` returns `nil` if the SDK is uninitialized, traces are disabled, or the name is blank, including on the Simulator and under a debugger. Handle the optional result; do not force-unwrap it. The trace is thread-safe. ```swift let trace = AppeliumFeedback.startPerformanceTrace(name: "startPlayback") trace?.setValue("movie", forAttribute: "contentType") trace?.setValue("featured", forAttribute: "entryPoint") // Perform the work you want to measure trace?.stop() ``` -------------------------------- ### Enable performance traces with AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/ios/performance-traces/ Enables performance traces and the automatic App Start trace. Requires a valid API key. ```swift AppeliumFeedback.start( apiKey: "YOUR_API_KEY", performanceTraces: .enabled ) ``` -------------------------------- ### AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/android/console-logs/ Starts the Appelium SDK. Must be called once from your Application or app startup code. Allows configuring log retention limits. ```APIDOC ## [START] AppeliumFeedback.start ### Description Starts the Appelium SDK. Must be called once from your Application or app startup code. Allows configuring log retention limits. ### Method Start ### Endpoint AppeliumFeedback.start ### Parameters #### Request Body - **apiKey** (String) - Required - Your Appelium API key. - **application** (Application) - Required - The application instance. - **logsRetention** (LogsRetentionConfiguration) - Optional - Configuration for log retention, with `maxLifetime` and `maxCount`. ### Response No response value. ### Request Example ```kotlin import kotlin.time.Duration.Companion.minutes AppeliumFeedback.start( apiKey = "YOUR_API_KEY", application = this, logsRetention = LogsRetentionConfiguration( maxLifetime = 2.minutes, maxCount = 1_000 ) ) ``` ``` -------------------------------- ### Create Application Build - Android curl Example Source: https://developer.appelium.com/documentation/api/builds/ Uploads an Android .apk file to POST /v2/builds. Requires X-Appelium-Token and X-Appelium-Application-Alias headers. Content-Type is application/vnd.android.package-archive. ```bash curl -X POST "https://api.appelium.com/v2/builds" \ -H "X-Appelium-Token: " \ -H "X-Appelium-Application-Alias: " \ -H "Content-Type: application/vnd.android.package-archive" \ --data-binary @app-release.apk ``` -------------------------------- ### AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/ios/attachments/ Starts the Appelium feedback SDK with bug reporting enabled and a delegate for attachments. ```APIDOC ## AppeliumFeedback.start ### Description Starts the Appelium feedback SDK with bug reporting enabled and a delegate for attachments. ### Method AppeliumFeedback.start(apiKey:bugReporting:) ### Parameters - **apiKey** (String) - Your Appelium API key. - **bugReporting** (BugReportingConfiguration) - Configuration for bug reporting, e.g., .enabled(delegate: self). ### Example ```swift AppeliumFeedback.start( apiKey: "YOUR_API_KEY", bugReporting: .enabled(delegate: self) ) ``` ``` -------------------------------- ### Report the first frame with reportFirstFrame Source: https://developer.appelium.com/documentation/feedback/ios/performance-traces/ Reports the moment the first screen is shown when the SDK is started after the first screen appears. Call it on the main thread, after start. It is ignored once the first frame has been recorded, including by the SDK itself. ```swift AppeliumFeedback.reportFirstFrame() ``` -------------------------------- ### AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/ios/integration/ Starts the AppeliumFeedback SDK with the given API key and configuration options. The logsRetention parameter allows you to customize the retention of activity logs. ```APIDOC ## AppeliumFeedback.start ### Description Starts the AppeliumFeedback SDK with the given API key and configuration options. The logsRetention parameter allows you to customize the retention of activity logs. ### Method start ### Parameters - **apiKey** (String) - Required - Your Appelium API key. - **crashReporting** (CrashReporting) - Optional - Enable or disable crash reporting. - **logsRetention** (LogsRetentionConfiguration) - Optional - Configuration for log retention. `maxLifetime` is in seconds; when the log holds more than `maxCount` entries, the oldest are removed first. ### Example ```swift AppeliumFeedback.start( apiKey: "YOUR_API_KEY", crashReporting: .enabled, logsRetention: LogsRetentionConfiguration(maxLifetime: 300, maxCount: 2_000) ) ``` ``` -------------------------------- ### Enable performance traces with AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/flutter/performance-traces/ Enables performance traces and the automatic App Start trace. Call this in main before runApp. ```dart AppeliumFeedback.start( apiKeys: apiKeys, performanceTraces: PerformanceTracesConfiguration.enabled, ); ``` -------------------------------- ### logRequestStart Source: https://developer.appelium.com/documentation/feedback/android/network-logs/ Logs the start of an HTTP request for clients not integrated with Appelium. Returns a token that must be used with the corresponding finish or error call. ```APIDOC ## logRequestStart ### Description Logs the start of an HTTP request for clients not integrated with Appelium. Returns a token that must be used with the corresponding finish or error call. ### Method logRequestStart ### Parameters - **url** (String) - Required - The request URL. - **method** (String) - Required - The HTTP method (e.g., "POST"). - **headers** (List) - Optional - Request headers. - **body** (String?) - Optional - Request body. ### Returns - **token** (Token) - The token to use with logRequestFinish or logRequestError. ### Request Example ```kotlin val token = AppeliumFeedback.logRequestStart( url = url, method = "POST", headers = listOf(HTTPHeaderField(name = "Content-Type", value = "application/json")), body = requestBody ) ``` ``` -------------------------------- ### Create Application Build - iOS curl Example Source: https://developer.appelium.com/documentation/api/builds/ Uploads an iOS .ipa file to POST /v2/builds. Requires X-Appelium-Token and X-Appelium-Application-Alias headers. Content-Type is application/octet-stream. ```bash curl -X POST "https://api.appelium.com/v2/builds" \ -H "X-Appelium-Token: " \ -H "X-Appelium-Application-Alias: " \ -H "Content-Type: application/octet-stream" \ --data-binary @MyApp.ipa ``` -------------------------------- ### Add AppeliumTestsKit binary to Cartfile Source: https://developer.appelium.com/documentation/tests/tvos/integration/ Add the AppeliumTestsKit SDK archive to your Cartfile for Carthage installation. ```plaintext binary "https://api.appelium.com/v1/sdkArchives/AppeliumTestsKit.json" ``` -------------------------------- ### logRequestStart(urlRequest:) Source: https://developer.appelium.com/documentation/feedback/ios/network-logs/ Starts a manual request log using a URLRequest. Headers are logged sorted by name, like URLSession. ```APIDOC ## logRequestStart(urlRequest:) ### Description Starts a manual request log using a URLRequest. Headers are logged sorted by name, like URLSession. ### Method logRequestStart ### Parameters - **urlRequest** (URLRequest) - Required - The URL request to log. ### Returns - **token** - A token to be used with logRequestFinish or logRequestError. ### Request Example ```swift let token = AppeliumFeedback.logRequestStart(urlRequest: urlRequest) ``` ``` -------------------------------- ### Measure an operation with startPerformanceTrace Source: https://developer.appelium.com/documentation/feedback/ios/performance-traces/ Starts a trace with a descriptive name, adds attributes, and stops it when the operation finishes. Returns nil when traces are disabled, SDK not started, name is blank, on Simulator, or while a debugger is attached. Handle the optional; do not force-unwrap. ```swift let trace = AppeliumFeedback.startPerformanceTrace(name: "checkout") trace?.setValue("cart", forAttribute: "flow") trace?.setValue(user.tier.rawValue, forAttribute: "userTier") // Perform the work you want to measure trace?.stop() ``` -------------------------------- ### reportFirstFrame() Source: https://developer.appelium.com/documentation/feedback/tvos/performance-traces/ Reports the moment the first screen is shown. Call it on the main thread, after start. It is ignored once the first frame has been recorded, including by the SDK itself. ```APIDOC ## reportFirstFrame() ### Description Reports the moment the first screen is shown. Call it on the main thread, after start. It is ignored once the first frame has been recorded, including by the SDK itself. ### Method reportFirstFrame ### Parameters None ### Request Example ```swift AppeliumFeedback.reportFirstFrame() ``` ``` -------------------------------- ### initialize Source: https://developer.appelium.com/documentation/api/mcp/ Negotiates the MCP protocol version and returns server capabilities and short usage instructions for the agent. ```APIDOC ## initialize ### Description Negotiates the MCP protocol version and returns server capabilities and short usage instructions for the agent. ### Method initialize ### Endpoint initialize ``` -------------------------------- ### List available tools via tools/list Source: https://developer.appelium.com/documentation/api/mcp/ Lists available tools and input schemas. This is the source of truth for currently available tools. ```json { "jsonrpc": "2.0", "id": 2, "method": "tools/list" } ``` -------------------------------- ### Enable crash reporting with AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/android/crash-reports/ Crash reporting is off by default and must be enabled when starting the SDK. Call start in Application.onCreate; crashes before start are not recorded. Crash reports are saved on device and uploaded on next app open, then the exception is passed to the previously installed handler. ```kotlin AppeliumFeedback.start( apiKey = "YOUR_API_KEY", application = this, crashReporting = CrashReportingConfiguration.Enabled ) ``` -------------------------------- ### AppeliumFeedback.startPerformanceTrace(name:) Source: https://developer.appelium.com/documentation/feedback/ios/performance-traces/ Starts a performance trace with a descriptive name. Returns an optional trace object that can be used to set attributes and stop the trace. ```APIDOC ## AppeliumFeedback.startPerformanceTrace(name:) ### Description Starts a performance trace with a descriptive name. Returns an optional trace object that can be used to set attributes and stop the trace. ### Method startPerformanceTrace ### Parameters - **name** (StaticString) - Required - The trace name. Must be a string literal. ### Returns - **Trace?** - Optional trace object. Returns `nil` when performance traces are disabled, the SDK has not been started, the name is blank, on the Simulator, or while a debugger is attached. ### Request Example ```swift let trace = AppeliumFeedback.startPerformanceTrace(name: "checkout") ``` ``` -------------------------------- ### initialize Source: https://developer.appelium.com/documentation/api/mcp/ Initializes the MCP connection with the specified protocol version and client information. ```APIDOC ## initialize ### Description Initializes the MCP connection with the specified protocol version and client information. ### Method initialize ### Parameters #### Request Body - **protocolVersion** (string) - Required - The protocol version to use. - **capabilities** (object) - Required - Client capabilities. - **clientInfo** (object) - Required - Information about the client. - **name** (string) - Required - Client name. - **version** (string) - Required - Client version. ### Request Example ```json { "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": { "name": "example-client", "version": "1.0.0" } } } ``` ``` -------------------------------- ### reporterEmailFieldMode Source: https://developer.appelium.com/documentation/feedback/ios/bug-reports/ Configures the reporter email field behavior. Set it before the form is shown, for example right after start. The mode can be .required (default), .optional, or .hidden. ```APIDOC ## [property] AppeliumFeedback.reporterEmailFieldMode ### Description Configures the reporter email field behavior. Set it before the form is shown, for example right after start. ### Property reporterEmailFieldMode ### Values - **.required** (default) - The field is shown and a valid email address is needed to send. - **.optional** - The field is shown and can be left empty. An entered address must be valid. - **.hidden** - The field is not shown. A report carries only an email that you pass to invoke(reporterEmail:). ### Notes The form is prefilled with the email you pass to invoke(reporterEmail:), or else with the one of the previous report. Surrounding spaces are ignored. ### Request Example ```swift AppeliumFeedback.reporterEmailFieldMode = .optional ``` ``` -------------------------------- ### Create XCUIApplication extension for common operations Source: https://developer.appelium.com/engineering/xpc-service/ Extend XCUIApplication to encapsulate repeated XPC calls. This example wraps a send call that decodes a UUID response. ```swift extension XCUIApplication { func getUserUuid() throws -> UUID { return try XCUIApplication().xpcService.send("getUserUuid", decoding: UUID.self) } } ``` -------------------------------- ### list_test_executions Source: https://developer.appelium.com/documentation/api/mcp/ Lists the latest test executions of the workspace or one application, with their test counts and success rate. Start here when the agent has no link, for example to check last night's run. ```APIDOC ## list_test_executions ### Description Lists the latest test executions of the workspace or one application, with their test counts and success rate. Start here when the agent has no link, for example to check last night's run. ``` -------------------------------- ### AppeliumFeedback.setUserIdentifier Source: https://developer.appelium.com/documentation/feedback/android/integration/ Attaches a user identifier to crash, error, and bug reports so you can find reports from a specific user in the Dashboard. Call this after start, for example when the user signs in, and pass null when they sign out. ```APIDOC ## AppeliumFeedback.setUserIdentifier ### Description Attaches a user identifier to crash, error, and bug reports so you can find reports from a specific user in the Dashboard. ### Method setUserIdentifier ### Parameters - **userIdentifier** (String?) - Required - The user identifier to attach. Pass null to clear it. Limited to 50 characters; longer values are truncated. ### Request Example ```kotlin AppeliumFeedback.setUserIdentifier(userIdentifier = "ABC-12345") ``` ``` -------------------------------- ### AppeliumFeedback.setUserIdentifier Source: https://developer.appelium.com/documentation/feedback/ios/integration/ Attaches a user identifier to crash, error, and bug reports so you can find reports from a specific user in the Dashboard. Call it after start, for example when the user signs in, and pass nil when they sign out. ```APIDOC ## AppeliumFeedback.setUserIdentifier ### Description Attaches a user identifier to crash, error, and bug reports so you can find reports from a specific user in the Dashboard. Call it after start, for example when the user signs in, and pass nil when they sign out. ### Method setUserIdentifier ### Parameters - **identifier** (String?) - Required - The user identifier. Limited to 50 characters; longer values are truncated. Use an opaque ID from your own system rather than an email address or a name. ### Example ```swift AppeliumFeedback.setUserIdentifier("ABC-12345") ``` ``` -------------------------------- ### GET /v1/applications/:applicationId/builds Source: https://developer.appelium.com/documentation/api/builds/ Returns a list of all builds for the provided applicationId. Use the X-Appelium-Token header for authentication and optionally filter by distribution group. ```APIDOC ## [GET] /v1/applications/:applicationId/builds ### Description Returns a list of all builds for the provided applicationId. ### Method GET ### Endpoint https://api.appelium.com/v1/applications/:applicationId/builds ### Parameters #### Path Parameters - **applicationId** (int) - Required - The ID of the application #### Header Parameters - **X-Appelium-Token** (string) - Required - API token generated in Dashboard #### Query Parameters - **distributionGroupName** (string) - Optional - Filter only builds that are part of a specific distribution group ### Response #### Success Response (200) ```json { "data": [ { "id": 12345, "shortVersion": "3.2.0", "version": "38", "serialNumber": 36, "installUrl": "itms-services://?action=download-manifest&url=https://...", "minimumOsVersion": "11.0", "creationDate": "2019-10-05T19:23:40.305Z", "updateDate": "2019-10-05T19:23:40.305Z", "expirationDate": "2020-05-26T11:15:36.000Z" } ] } ``` #### Error Response (401) ```json { "id": "388677B7-B016-4A6C-A8AE-887B3814114C", "httpStatus": 401, "title": "Unauthorized", "detail": "Invalid or missing X-Appelium-Token header" } ``` ``` -------------------------------- ### AppeliumFeedback.reporterEmailFieldMode Source: https://developer.appelium.com/documentation/feedback/android/bug-reports/ Sets the mode of the reporter email field before the form is shown. Change it for example right after `start`. The mode controls whether the email field is shown and whether a valid email is required. ```APIDOC ## AppeliumFeedback.reporterEmailFieldMode ### Description Sets the mode of the reporter email field before the form is shown. Change it for example right after `start`. ### Method Property setter ### Parameters #### Parameters - **reporterEmailFieldMode** (EmailFieldMode) - Required - The mode to set. Possible values: `EmailFieldMode.REQUIRED` (default), `EmailFieldMode.OPTIONAL`, `EmailFieldMode.HIDDEN`. ### Usage ```kotlin AppeliumFeedback.reporterEmailFieldMode = EmailFieldMode.OPTIONAL ``` ### Modes | Mode | Behaviour | | --- | --- | | `EmailFieldMode.REQUIRED` (default) | The field is shown and a valid email address is needed to send. | | `EmailFieldMode.OPTIONAL` | The field is shown and can be left empty. An entered address must be valid. | | `EmailFieldMode.HIDDEN` | The field is not shown. A report carries only an email that you pass to `invoke(reporterEmail)`. | ### Notes - The form is prefilled with the email you pass to `invoke(reporterEmail)`, or else with the one of the previous report. Surrounding spaces are ignored. ``` -------------------------------- ### Simulate camera blurriness and sharpness during runtime Source: https://developer.appelium.com/engineering/xpc-service/ Demonstrates changing camera simulation mode at runtime to test re-take flow, which is not possible with launch arguments. ```swift let app = XCUIApplication() app.cameraSimulationMode = .blurry app.buttons["Take photo"].tap() XCTAssertTrue(app.staticTexts["Image too blurry"].exists) app.cameraSimulationMode = .sharp app.buttons["Re-take photo"].tap() XCTAssertTrue(app.staticTexts["Success"].exists) ``` -------------------------------- ### logRequestStart(url:method:headers:body:) Source: https://developer.appelium.com/documentation/feedback/ios/network-logs/ Starts a manual request log for a networking stack that does not use URLSession. Returns a token to be used with the corresponding finish or error method. ```APIDOC ## logRequestStart(url:method:headers:body:) ### Description Starts a manual request log for a networking stack that does not use URLSession. Returns a token to be used with the corresponding finish or error method. ### Method logRequestStart ### Parameters - **url** (URL) - Required - The URL of the request. - **method** (String) - Required - The HTTP method (e.g., "POST"). - **headers** ([HTTPHeaderField]) - Required - The request headers. Headers are logged in the order passed, with repeated names as separate fields and preserving case. - **body** (Data?) - Optional - The request body. Only the first 25,000 characters are logged. - **bodyBytesCount** (Int?) - Optional - The total size of the body if only the beginning is passed. ### Returns - **token** - A token to be used with logRequestFinish or logRequestError. ### Request Example ```swift let token = AppeliumFeedback.logRequestStart( url: URL(string: "https://api.example.com/orders")!, method: "POST", headers: [HTTPHeaderField(name: "Content-Type", value: "application/json")], body: requestBody ) ``` ``` -------------------------------- ### AppeliumTests.logRequestStart(urlRequest:) Source: https://developer.appelium.com/documentation/tests/ios/network-logs/ Starts manual network request capture using an existing URLRequest. Headers are logged sorted by name because iOS does not preserve their order. ```APIDOC ## AppeliumTests.logRequestStart(urlRequest:) ### Description Starts manual network request capture using an existing URLRequest. Headers are logged sorted by name because iOS does not preserve their order. ### Method logRequestStart ### Parameters #### Parameters - **urlRequest** (URLRequest) - Required - The request to capture. ### Returns - **token** - A token linking the request start to its finish or error. ### Request Example ```swift let token = AppeliumTests.logRequestStart(urlRequest: urlRequest) ``` ``` -------------------------------- ### Enable network monitoring in AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/flutter/network-logs/ Enable network monitoring by passing NetworkMonitoringConfiguration.enabled to the start method. The SDK records aggregated performance metrics for captured requests, excluding headers, bodies, and query values. Requests to localhost and cancelled requests are not included, and monitoring is disabled while a native debugger is attached. ```dart AppeliumFeedback.start( apiKeys: apiKeys, networkMonitoring: NetworkMonitoringConfiguration.enabled, ); ``` -------------------------------- ### VS Code MCP configuration for Appelium Source: https://developer.appelium.com/documentation/api/mcp/ Add this to `.vscode/mcp.json` or use the MCP: Add Server command. Uses OAuth sign-in. ```json { "servers": { "appelium": { "type": "http", "url": "https://api.appelium.com/v1/mcp" } } } ``` -------------------------------- ### Cursor MCP configuration for Appelium Source: https://developer.appelium.com/documentation/api/mcp/ Add to `.cursor/mcp.json` or `~/.cursor/mcp.json`. Cursor prompts for sign-in. For API key, add `"headers": { "X-Appelium-Token": "" }`. ```json { "mcpServers": { "appelium": { "url": "https://api.appelium.com/v1/mcp" } } } ``` -------------------------------- ### Enable crash reporting in AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/ios/crash-reports/ Crash reporting is off by default and must be enabled when starting the SDK. Start the SDK as early as possible in the app's launch; crashes before start are not recorded. Crash reporting is automatically disabled when a debugger is attached. ```swift AppeliumFeedback.start( apiKey: "YOUR_API_KEY", crashReporting: .enabled ) ``` -------------------------------- ### tools/call Source: https://developer.appelium.com/documentation/api/mcp/ Executes a tool in your workspace with the provided arguments. ```APIDOC ## tools/call ### Description Executes a tool in your workspace with the provided arguments. ### Method tools/call ### Endpoint tools/call ``` -------------------------------- ### Download full log and search entries with grep Source: https://developer.appelium.com/documentation/api/mcp/ Use this shell snippet to download the full log from the provided URL and search for a specific entry (e.g., #1834) or for ERROR lines. The link works for one hour without credentials; save the file outside your project because logs can contain user data. ```bash log_file="$(mktemp -d)/log.txt" curl -s -o "$log_file" "" grep '^#1834 ' "$log_file" # the complete entry 1834 grep -n "ERROR" "$log_file" ``` -------------------------------- ### Enable crash reporting with CrashReportingConfiguration.enabled Source: https://developer.appelium.com/documentation/feedback/flutter/crash-reports/ Crash reporting is off by default and must be enabled when starting the SDK. Start the SDK as early as possible in main; crashes before start are not recorded. Crash reports are saved on the device and uploaded the next time the user opens the app. ```dart AppeliumFeedback.start( apiKeys: apiKeys, crashReporting: CrashReportingConfiguration.enabled, ); ``` -------------------------------- ### Start manual request logging with URLRequest Source: https://developer.appelium.com/documentation/feedback/ios/network-logs/ Alternative to the URL-based start when you have a URLRequest. Headers are logged sorted by name, like URLSession. ```swift let token = AppeliumFeedback.logRequestStart(urlRequest: urlRequest) ``` -------------------------------- ### Enable error reporting in AppeliumFeedback.start Source: https://developer.appelium.com/documentation/feedback/ios/error-reports/ Error reporting is off by default and must be enabled when starting the SDK. Pass errorReporting: .enabled to the start method. ```swift AppeliumFeedback.start( apiKey: "YOUR_API_KEY", errorReporting: .enabled ) ``` -------------------------------- ### LoginScreen implementation with chaining Source: https://developer.appelium.com/engineering/xcuitests-skeleton/ Shows a screen that verifies its presence and returns a HomeScreen after submitting the login form. The init function serves as a synchronization point, and the submitLoginForm method chains to the next screen. ```swift struct LoginScreen: Screen { init() { self.verify(timeout: .appLaunch) { snapshot in snapshot.textFields["username"].exists && snapshot.secureTextFields["password"].exists } } @discardableResult func submitLoginForm(username: String, password: String) -> HomeScreen { self.app.textFields["username"].typeText(username) self.app.textFields["password"].typeText(password) self.app.buttons["Submit"].tap() return HomeScreen() } } ``` -------------------------------- ### startPerformanceTrace(name:) Source: https://developer.appelium.com/documentation/feedback/tvos/performance-traces/ Starts a performance trace with a descriptive name. Returns an optional trace object, which is nil if the SDK is uninitialized, traces are disabled, or the name is blank. The trace is thread-safe and can be updated and stopped from different threads. ```APIDOC ## startPerformanceTrace(name:) ### Description Starts a performance trace with a descriptive name. Returns an optional trace object, which is nil if the SDK is uninitialized, traces are disabled, or the name is blank. The trace is thread-safe and can be updated and stopped from different threads. ### Method startPerformanceTrace ### Parameters - **name** (String) - Required - A descriptive name for the trace. ### Returns - **Trace?** - Optional trace object; nil if the SDK is uninitialized, traces are disabled, or the name is blank. ### Request Example ```swift let trace = AppeliumFeedback.startPerformanceTrace(name: "startPlayback") ``` ``` -------------------------------- ### Register handler for incoming message with decoding Source: https://developer.appelium.com/engineering/xpc-service/ Register a handler in application:didFinishLaunchingWithOptions: to process messages from the test client. The XPCService is optional on device; it is nil unless the app is being tested, but always available in the Simulator. ```swift AppeliumFeedback.xpcService?.on("setCameraMode", decoding: CameraMode.self) { cameraMode in /// store cameraMode for later use when simulating camera capture } ``` -------------------------------- ### Enable logging for URLSessionConfiguration before creating session Source: https://developer.appelium.com/documentation/feedback/ios/network-logs/ Use this to capture network traffic for a URLSession created before the SDK start. Call AppeliumFeedback.enableLogging(for:) on the configuration before creating the session; requests are then logged from start. ```swift let configuration = URLSessionConfiguration.default AppeliumFeedback.enableLogging(for: configuration) let session = URLSession(configuration: configuration) ``` -------------------------------- ### Run Carthage update for iOS Source: https://developer.appelium.com/documentation/feedback/ios/integration/ Run this command to fetch and build the framework. After it finishes, drag AppeliumFeedbackKit.xcframework into your Xcode project and add it to your app target. ```bash carthage update --platform iOS --use-xcframeworks ``` -------------------------------- ### Start AppeliumTests with AppeliumTestWatcher in a base test class Source: https://developer.appelium.com/documentation/tests/android/integration/ Starts the SDK in a base test class and adds AppeliumTestWatcher as a JUnit rule to record each test. Only the first build() starts the SDK; later calls return the same instance, so every test class can extend BaseTest. Optional settings include test execution environment and test plan name. ```kotlin import com.appelium.appelium_tests.AppeliumTestWatcher import com.appelium.appelium_tests.AppeliumTests import org.junit.Rule import org.junit.Test open class BaseTest { @get:Rule val appeliumTestWatcher = AppeliumTestWatcher() init { AppeliumTests.Builder(apiKey = "YOUR_API_KEY").build() // Optional: the backend environment the tests run against AppeliumTests.setTestExecutionEnvironment(name = "STAGING", version = "2.4.0") // Optional: the name of the test plan, such as Complete, Smoke or PR AppeliumTests.testPlanName = "Complete" } } class LoginTest : BaseTest() { @Test fun loginWithValidCredentials() { // ... } } ``` -------------------------------- ### Conforming screens to app-specific protocols Source: https://developer.appelium.com/engineering/xcuitests-skeleton/ Shows how to conform screen structs to the app-specific protocols instead of the generic Screen protocol, as required for multi-app testing. ```swift struct DriverLoginScreen: DriverAppScreen { } struct PassengerProfileScreen: PassengerAppScreen { } ``` -------------------------------- ### Curl to list Appelium MCP tools Source: https://developer.appelium.com/documentation/api/mcp/ Checks an API key by listing tools. Uses `X-Appelium-Token` header and JSON-RPC `tools/list` method. ```bash curl https://api.appelium.com/v1/mcp \ -H "X-Appelium-Token: $APPELIUM_API_KEY" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' ``` -------------------------------- ### curl GET request with X-Appelium-Token header Source: https://developer.appelium.com/documentation/api/authentication/ Sends a GET request to the Appelium API with the workspace API key in the X-Appelium-Token header. Replace YOUR_API_KEY with the actual key. Do not put the key in the URL or query string. ```bash curl --request GET \ --url https://api.appelium.com/v1/applications \ --header 'X-Appelium-Token: YOUR_API_KEY' ``` -------------------------------- ### Start AppeliumFeedback SDK in tvOS app delegate Source: https://developer.appelium.com/documentation/feedback/tvos/integration/ Call start from application(_:didFinishLaunchingWithOptions:) in your app delegate. Every feature is off until you enable it, so list only what your Apple TV app needs. On tvOS, pass an empty invocationEvents set and disable screenRecording. ```swift import AppeliumFeedbackKit AppeliumFeedback.start( apiKey: "YOUR_API_KEY", bugReporting: .enabled( screenshotsEnabled: true, screenRecording: .disabled, invocationEvents: [] ), crashReporting: .enabled, errorReporting: .enabled, networkMonitoring: .enabled, sessionMonitoring: .enabled, performanceTraces: .enabled ) ``` -------------------------------- ### tools/list Source: https://developer.appelium.com/documentation/api/mcp/ Returns the list of available tools and their input schemas. ```APIDOC ## tools/list ### Description Returns the list of available tools and their input schemas. ### Method tools/list ### Endpoint tools/list ```