manus-skills/.kortix/opencode/skills/coding/appium-skill/reference/ios-specific.md
zhukang 1c7abd81d1 All 310 Manus skill-hub community skills as a Kortix marketplace registry
- 310 registry:skill items, 1528 files, 7 categories (hub tags)
- registry.json generated by @kortix/registry buildRegistry
- nested SKILL.md in sn-da-* renamed SUBSKILL.md (no phantom skills)
- provenance + licenses: SOURCES.md
2026-09-15 13:37:20 +08:00

2.0 KiB

Appium — iOS-Specific Patterns

XCUITest Driver Capabilities

XCUITestOptions options = new XCUITestOptions();
options.setDeviceName("iPhone 16");
options.setPlatformVersion("18");
options.setApp("/path/to/app.ipa");
options.setAutomationName("XCUITest");
options.setBundleId("com.example.app");

// iOS-specific settings
options.setCapability("appium:wdaLaunchTimeout", 120000);
options.setCapability("appium:wdaConnectionTimeout", 240000);
options.setCapability("appium:showXcodeLog", true);

iOS-Only Locators

// Predicate string (fast, powerful)
driver.findElement(AppiumBy.iOSNsPredicateString(
    "type == 'XCUIElementTypeButton' AND label == 'Login'"
));

// Class chain (like XPath but faster on iOS)
driver.findElement(AppiumBy.iOSClassChain(
    "**/XCUIElementTypeCell[`label CONTAINS 'Item'`]"
));

// Accessibility ID (best — cross-platform)
driver.findElement(AppiumBy.accessibilityId("loginButton"));

iOS Alerts

// Handle system alerts (permissions, etc.)
options.setCapability("appium:autoAcceptAlerts", true);
// OR handle manually:
driver.switchTo().alert().accept();

iOS Keyboard

// Hide keyboard (iOS doesn't auto-hide)
driver.hideKeyboard();
// Or tap done button
driver.findElement(AppiumBy.accessibilityId("Done")).click();

iOS-Specific Gestures

// Pull-to-refresh
Map<String, Object> params = new HashMap<>();
params.put("direction", "down");
driver.executeScript("mobile: scroll", params);

// Swipe to delete in table
Map<String, Object> swipeParams = new HashMap<>();
swipeParams.put("direction", "left");
swipeParams.put("element", element.getId());
driver.executeScript("mobile: swipe", swipeParams);

Face ID / Touch ID (Simulator)

// Enroll biometrics
driver.executeScript("mobile: enrollBiometric", Map.of("isEnabled", true));

// Match (success)
driver.executeScript("mobile: sendBiometricMatch", Map.of("type", "faceId", "match", true));

// No match (failure)
driver.executeScript("mobile: sendBiometricMatch", Map.of("type", "faceId", "match", false));