Support

How can we help you?

Get answers to all your Stark-related questions with
step-by-step guides from our Support center.

Using the iOS Integration (beta)

Get your iOS accessibility results into the Stark dashboard


With Stark's iOS integration, you can unlock deeper accessibility scans and get youre results to show up in the Stark dashboard alongside your other assets.


Using the iOS Integration

📝
Each report is categorized based on the WCAG success criteria to make comparisons to other assets even simpler.

Requirements

  • iOS 17.0+ / macOS 14.0+
  • Swift 6.0+
  • Xcode 16.0+

Installation with Swift Package Manager

Add the following dependency to your Package.swift file:

dependencies: [
    .package(url: "https://github.com/stark-contrast/stark-ios.git", from: "0.0.1")
]

Or add it directly in Xcode:

  1. File > Swift Packages > Add Package Dependency
  2. Enter the repository URL: https://github.com/stark-contrast/stark-ios.git

Usage

import XCTest
import StarkAccessibilityIOS

class MyUITests: XCTestCase {
    func testAccessibility() throws {
        let app = XCUIApplication()
        app.launch()

        // Navigate to the screen you want to test
        app.tabBars.buttons["Home"].tap()

        // Create a checker and audit the screen
        let checker = AccessibilityChecker(starkProjectToken: "your-stark-project-token")
        try checker.auditScreen(application: app, scanName: "HomeScreen")
    }
}

Suppressing Test Failures

If you want to collect and report accessibility issues but not fail the test:

try checker.auditScreen(
    application: app,
    scanName: "HomeScreen",
    failTestOnAccessibilityIssues: false
)

Bringing scan results into Stark

  1. Log into your Stark account
  2. Click Create a Project
  3. Scroll to Add iOS app and follow the instructions shown
  4. Provide a Name for easy reference when viewing all of your assets
  5. Run the integration in iOS to see your results show up in Stark

Using the iOS SwiftLint Tool

A specialized SwiftLint tool that checks your iOS projects for accessibility compliance and automatically reports results to the Stark platform. Download the tool and learn about the numerous options it has for running it and sending results back to Stark.


Have any questions about using Stark's developer tools? Don’t hesitate to reach out to us at support@getstark.co.

Go back to articles