npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@acabai/ios

v1.0.1

Published

Appium-based iOS automation library for acabAI

Readme

@acabai/ios

iOS automation library for acabAI. Automate UI actions, extract data, and perform assertions using AI.

This package uses Appium and WebdriverIO to provide a robust and flexible iOS automation solution.

Installation

npm install @acabai/ios webdriverio

Note: You need to have Appium server installed and running to use this package. See Appium Installation Guide for details.

Documentation

Basic Usage with Local Appium Server

import { IOSAgent, agentFromLocalAppium, type IOSCapabilities } from '@acabai/ios';

// Define capabilities for the iOS device/simulator
const capabilities: IOSCapabilities = {
  platformName: 'iOS',
  'appium:automationName': 'XCUITest',
  'appium:deviceName': 'iPhone Simulator',
  'appium:udid': 'device_udid', // Optional: Specific device ID
  'appium:bundleId': 'com.apple.Preferences',
  'appium:noReset': true
};

// Create an agent using a local Appium server
const agent = await agentFromLocalAppium(capabilities);

// Launch the app
await agent.launch('com.apple.Preferences');

// Take a screenshot
const screenshot = await agent.page.screenshotBase64();

// Get screen size
const size = await agent.page.size();

// Tap on the screen
await agent.page.tap(100, 200);

// Scroll down
await agent.page.scrollDown(200);

// Use AI to find and interact with elements
await agent.aiAction('Find and tap on the Wi-Fi option');

// Check conditions with AI
const isEnabled = await agent.aiAssert('Is Wi-Fi enabled?');

// Clean up
await agent.page.disconnect();

Using a Custom Appium Server

import { 
  agentFromAppiumServer, 
  type AppiumServerConfig, 
  type IOSCapabilities 
} from '@acabai/ios';

// Define custom Appium server configuration
const serverConfig: AppiumServerConfig = {
  hostname: 'appium.example.com',
  port: 4723,
  path: '/wd/hub',
  protocol: 'https'
};

// Define capabilities for the iOS device
const capabilities: IOSCapabilities = {
  platformName: 'iOS',
  'appium:automationName': 'XCUITest',
  'appium:deviceName': 'iPhone',
  'appium:bundleId': 'com.example.app'
};

// Create an agent using the custom Appium server
const agent = await agentFromAppiumServer(serverConfig, capabilities);

Using Sauce Labs

import { 
  agentFromSauceLabs, 
  type SauceLabsConfig, 
  type IOSSauceLabsCapabilities 
} from '@acabai/ios';

// Define Sauce Labs configuration
const sauceConfig: SauceLabsConfig = {
  username: 'your-sauce-username',
  accessKey: 'your-sauce-access-key',
  region: 'us-west-1' // or 'us-east-1' or 'eu-central-1'
};

// Define capabilities for the iOS device on Sauce Labs
const capabilities: IOSSauceLabsCapabilities = {
  platformName: 'iOS',
  'appium:automationName': 'XCUITest',
  'appium:deviceName': 'iPhone.*',
  'appium:platformVersion': '16',
  'appium:bundleId': 'com.apple.Preferences',
  'sauce:options': {
    name: 'My iOS Test',
    build: 'Build 1'
  }
};

// Create an agent using Sauce Labs
const agent = await agentFromSauceLabs(sauceConfig, capabilities);

Required Appium Capabilities

The following capabilities are required for basic Appium functionality:

  • platformName: Must be 'iOS'
  • appium:automationName: Should be 'XCUITest' for iOS
  • appium:deviceName: A name for the device (e.g., 'iPhone Simulator', 'iPhone 14')

Additional useful capabilities:

  • appium:udid: Device ID for connecting to a specific device
  • appium:app: Path or URL to the .app or .ipa file
  • appium:bundleId: Bundle ID of the app
  • appium:platformVersion: iOS version
  • appium:noReset: Prevent app data from being cleared between sessions
  • appium:autoAcceptAlerts: Automatically accept permission alerts

Appium Server Setup

macOS Requirements

iOS automation with Appium requires macOS with:

  1. Xcode (from App Store)
  2. Xcode Command Line Tools: xcode-select --install
  3. Node.js and npm
  4. Appium: npm install -g appium
  5. Appium XCUITest driver: appium driver install xcuitest

Checking Setup

Use appium-doctor to verify your setup:

npm install -g appium-doctor
appium-doctor --ios

Fix any issues reported by appium-doctor before using this package.

Examples

The package includes several examples in the examples directory:

  • basic-usage.ts: Basic iOS automation
  • custom-hub.ts: Using a custom Appium server
  • sauce-labs.ts: Using Sauce Labs cloud testing
  • ai-automation.ts: AI-powered automation

Run the examples with:

# Basic usage example
npm run example:basic

# Custom Appium server example
npm run example:custom-hub

# Sauce Labs integration example
npm run example:sauce

# AI-powered automation example
npm run example:ai

License

acabAI is MIT licensed.