UNPKG

xc-mcp

Version:

MCP server that wraps Xcode command-line tools for iOS/macOS development workflows

26 lines 5.82 kB
/** * Manage simulator status bar appearance for testing * * Examples: * - Override appearance: udid: "device-123", operation: "override", time: "9:41", batteryLevel: 100 * - Clear overrides: udid: "device-123", operation: "clear" * - Set poor signal: udid: "device-123", operation: "override", dataNetwork: "none", wifiMode: "failed" * * Parameters (for override): * - time: 24-hour format (e.g., "9:41", "23:59") * - dataNetwork: none, 1x, 3g, 4g, 5g, lte, lte-a * - wifiMode: active, searching, failed * - batteryState: charging, charged, discharging * - batteryLevel: 0-100 * * **Full documentation:** See simctl/status-bar.md for detailed parameters and examples */ export declare function simctlStatusBarTool(args: any): Promise<{ content: { type: "text"; text: string; }[]; isError: boolean; }>; export declare const SIMCTL_STATUS_BAR_DOCS = "\n# simctl-status-bar\n\nOverride or clear simulator status bar appearance for consistent screenshots and UI testing.\n\n## What it does\n\nControls the simulator's status bar appearance, allowing you to set specific time, network\nstatus, battery level, and WiFi state. Useful for creating consistent screenshots and\ntesting app behavior under different device conditions.\n\n## Parameters\n\n- **udid** (string, required): Simulator UDID (from simctl-list)\n- **operation** (string, required): \"override\" or \"clear\"\n- **time** (string, optional): Time in 24-hour format (e.g., \"9:41\", \"23:59\")\n- **dataNetwork** (string, optional): Network type - none, 1x, 3g, 4g, 5g, lte, lte-a\n- **wifiMode** (string, optional): WiFi state - active, searching, failed\n- **batteryState** (string, optional): Battery state - charging, charged, discharging\n- **batteryLevel** (number, optional): Battery percentage 0-100\n\n## Returns\n\nJSON response with:\n- Status bar modification status\n- Applied parameters (for override operation)\n- Guidance for verification and testing\n\n## Examples\n\n### Override with classic Apple time\n```typescript\nawait simctlStatusBarTool({\n udid: 'device-123',\n operation: 'override',\n time: '9:41',\n batteryLevel: 100\n})\n```\n\n### Simulate poor network conditions\n```typescript\nawait simctlStatusBarTool({\n udid: 'device-123',\n operation: 'override',\n dataNetwork: 'none',\n wifiMode: 'failed'\n})\n```\n\n### Simulate low battery\n```typescript\nawait simctlStatusBarTool({\n udid: 'device-123',\n operation: 'override',\n batteryState: 'discharging',\n batteryLevel: 15\n})\n```\n\n### Clear all overrides\n```typescript\nawait simctlStatusBarTool({\n udid: 'device-123',\n operation: 'clear'\n})\n```\n\n## Common Use Cases\n\n1. **Consistent screenshots**: Set time to 9:41 and battery to 100% for app store screenshots\n2. **Network condition testing**: Test app behavior with different network types\n3. **Low battery testing**: Verify app handles low battery warnings correctly\n4. **UI testing**: Ensure status bar doesn't interfere with visual regression tests\n5. **Demo mode**: Clean status bar for presentations and demos\n\n## Status Bar Parameters\n\n### Time\n- Format: 24-hour \"HH:MM\" (e.g., \"9:41\", \"14:30\", \"23:59\")\n- Apple default: \"9:41\" (time of original iPhone announcement)\n\n### Data Network\n- **none**: No cellular data\n- **1x**: 2G network\n- **3g**: 3G network\n- **4g**: 4G network\n- **5g**: 5G network\n- **lte**: LTE network\n- **lte-a**: LTE Advanced\n\n### WiFi Mode\n- **active**: Connected and active\n- **searching**: Searching for network\n- **failed**: Connection failed\n\n### Battery State\n- **charging**: Device is charging\n- **charged**: Fully charged\n- **discharging**: Running on battery\n\n### Battery Level\n- Range: 0-100\n- Shows percentage in status bar\n\n## Important Notes\n\n- **Screenshot consistency**: Apply overrides before taking screenshots for consistent results\n- **Demo mode**: Apple often uses 9:41 time and 100% battery for marketing materials\n- **Simulator only**: Status bar overrides only work on simulators, not real devices\n- **Persistent**: Overrides persist until cleared or simulator is reset\n- **Version compatibility**: Some parameters may not work on older iOS versions\n\n## Error Handling\n\n- **Invalid time format**: Error if time is not in HH:MM format\n- **Invalid network type**: Error if dataNetwork is not in allowed list\n- **Invalid battery level**: Error if batteryLevel is not 0-100\n- **Simulator not found**: Validates simulator exists in cache\n\n## App Store Screenshot Best Practices\n\nFor app store screenshots, Apple recommends:\n1. Time: \"9:41\" (Apple's standard)\n2. Battery: 100% (shows full battery icon)\n3. Signal: Full bars (use \"lte\" or \"5g\")\n4. WiFi: Active (shows connected)\n5. No notifications or indicators\n\n```typescript\nawait simctlStatusBarTool({\n udid: 'device-123',\n operation: 'override',\n time: '9:41',\n dataNetwork: '5g',\n wifiMode: 'active',\n batteryState: 'charged',\n batteryLevel: 100\n})\n```\n\n## Testing Workflow\n\n1. **Apply overrides**: Set desired status bar state\n2. **Take screenshot**: `simctl-io <udid> screenshot` to verify\n3. **Test app**: Launch app and verify it handles the conditions\n4. **Clear overrides**: Reset to normal state when done\n\n## Visual Verification\n\nAfter applying overrides, always take a screenshot to verify the status bar appears correctly:\n```\nsimctl-io <udid> screenshot\n```\n\nThe status bar changes are visible immediately and affect all screenshots taken while\noverrides are active.\n\n## When to Clear Overrides\n\n- After taking app store screenshots\n- Before testing features that depend on actual device state\n- When switching between different test scenarios\n- At the end of automated test runs\n"; //# sourceMappingURL=status-bar.d.ts.map