
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
@rpascene/ios
Advanced tools
iOS automation library for Rpascene, providing AI-powered testing and automation capabilities for iOS simulators and devices.
# Install Xcode Command Line Tools
xcode-select --install
# Verify simctl is available
xcrun simctl list devices
# Install WebDriverAgent dependency
npm install appium-webdriveragent
Rpascene iOS uses WebDriverAgent for device automation. You need to prepare WebDriverAgent before using the library:
Install WebDriverAgent dependency:
npm install appium-webdriveragent
Build and start WebDriverAgent:
# Navigate to WebDriverAgent project
cd node_modules/appium-webdriveragent
# Build and run for simulator
xcodebuild -project WebDriverAgent.xcodeproj \
-scheme WebDriverAgentRunner \
-destination 'platform=iOS Simulator,name=iPhone 15' \
test
Configure Development Team:
node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj in XcodeWebDriverAgentLib and WebDriverAgentRunner targetsBuild and deploy to device:
# Replace DEVICE_UDID with your device's UDID
xcodebuild -project WebDriverAgent.xcodeproj \
-scheme WebDriverAgentRunner \
-destination 'id=YOUR_DEVICE_UDID' \
test
Trust Developer Certificate:
Set up port forwarding (for real devices):
# Install iproxy (if needed)
brew install libimobiledevice
# Forward local port 8100 to device port 8100
iproxy -u YOUR_DEVICE_ID 8100:8100
For more advanced setup options and troubleshooting, refer to the official WebDriverAgent documentation: 📖 WebDriverAgent Setup Guide
⚠️ Important: WebDriverAgent must be running on port 8100 (default) before using Rpascene iOS. If WebDriverAgent is not detected, you'll receive setup instructions.
npm install @rpascene/ios
# or
pnpm add @rpascene/ios
import { agentFromWebDriverAgent } from '@rpascene/ios';
// Connect to WebDriverAgent (auto-detects device)
const agent = await agentFromWebDriverAgent();
// Launch an app
await agent.launch('com.apple.MobileSafari');
// Perform AI-powered actions
await agent.aiAction('tap on the address bar');
await agent.aiAction('type "https://example.com"');
await agent.aiAction('tap the go button');
import { agentFromWebDriverAgent } from '@rpascene/ios';
// Connect to WebDriverAgent on custom host/port
const agent = await agentFromWebDriverAgent({
wdaHost: 'localhost',
wdaPort: 8100, // Custom port
aiActionContext: 'If any popup appears, click agree',
});
// Launch app and interact
await agent.launch('com.yourapp.bundleid');
await agent.aiAction('tap the login button');
Core device automation class implementing the AbstractInterface.
import { IOSDevice } from '@rpascene/ios';
// Create device (deviceId is auto-detected from WebDriverAgent)
const device = new IOSDevice({
wdaHost: 'localhost',
wdaPort: 8100,
});
await device.connect();
// Basic interactions
await device.tap(100, 200);
await device.swipe(100, 200, 300, 400);
await device.typeText('Hello World');
await device.pressKey('Enter');
// iOS-specific actions
await device.home();
await device.appSwitcher();
await device.longPress(150, 300, 1000);
// Screenshots
const screenshot = await device.screenshotBase64();
// Cleanup
await device.destroy();
High-level agent for AI-powered automation.
import { IOSAgent, agentFromWebDriverAgent } from '@rpascene/ios';
// Recommended approach
const agent = await agentFromWebDriverAgent();
// AI actions
await agent.aiAction('tap the settings icon');
await agent.aiQuery('what is the current battery level?');
await agent.aiWaitFor('the page is loaded');
// App management
await agent.launch('com.apple.Preferences');
import {
checkIOSEnvironment,
ensureSimulatorBooted,
// Note: getConnectedDevices and getDefaultDevice are deprecated
// Use agentFromWebDriverAgent() instead
} from '@rpascene/ios';
// Environment check
const envStatus = await checkIOSEnvironment();
console.log('iOS environment available:', envStatus.available);
// Simulator management (if needed)
await ensureSimulatorBooted('simulator-udid');
// Simulator management
await ensureSimulatorBooted('device-udid');
Set environment variables for default behavior:
# Default device UDID
export MIDSCENE_IOS_DEVICE_UDID=your-device-udid
# Default simulator UDID
export MIDSCENE_IOS_SIMULATOR_UDID=your-simulator-udid
tap(x, y) - Single tap at coordinatesdoubleTap(x, y) - Double tap at coordinateslongPress(x, y, duration) - Long press with durationswipe(fromX, fromY, toX, toY) - Swipe gesturetypeText(text) - Type text using iOS keyboardpressKey(key) - Press specific keys (Enter, Backspace, etc.)clearInput(element) - Clear input fieldscrollUp/Down/Left/Right(distance?, startPoint?) - Directional scrollingscrollUntilTop/Bottom/Left/Right(startPoint?) - Scroll to extremeshome() - Press home buttonappSwitcher() - Open app switcherhideKeyboard() - Dismiss keyboardaiAction(instruction) - Perform action based on natural languageaiQuery(question) - Query UI state with natural languageaiWaitFor(condition) - Wait for condition to be metimport { describe, it } from 'vitest';
import { agentFromWebDriverAgent } from '@rpascene/ios';
describe('iOS App Test', () => {
it('should login to app', async () => {
// WebDriverAgent auto-detects the connected device
const agent = await agentFromWebDriverAgent();
// Launch your app
await agent.launch('com.yourcompany.yourapp');
// AI-powered login flow
await agent.aiAction('tap on email field');
await agent.aiAction('type "user@example.com"');
await agent.aiAction('tap on password field');
await agent.aiAction('type "password123"');
await agent.aiAction('tap the login button');
// Verify successful login
await agent.aiWaitFor('dashboard is visible');
const isLoggedIn = await agent.aiQuery('is the user logged in?');
expect(isLoggedIn).toBe(true);
});
});
"No iOS devices available"
xcrun simctl list devices shows available simulators"Command failed: xcrun simctl"
xcode-select --install if neededwhich xcrun returns a valid pathSimulator not responding
xcrun simctl shutdown all && xcrun simctl boot <udid>App launch fails
Enable debug logging:
process.env.DEBUG = 'ios:*';
MIT License - see LICENSE file for details.
FAQs
RPA iOS automation library for Rpascene
The npm package @rpascene/ios receives a total of 7 weekly downloads. As such, @rpascene/ios popularity was classified as not popular.
We found that @rpascene/ios demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.