run-ios-simulator
Build and run an iPlug2 iOS app in the iOS Simulator
When & Why to Use This Skill
This Claude skill automates the end-to-end process of building and deploying iPlug2 iOS projects to the iOS Simulator. It streamlines mobile development workflows by handling complex CLI tasks including project identification, simulator UDID management, xcodebuild configuration, and app installation, significantly reducing the manual overhead for audio plugin and iOS developers.
Use Cases
- Rapid Prototyping and Testing: Quickly build and launch iPlug2 projects on specific iOS devices (e.g., iPhone 17 Pro) to verify UI layouts and core functionality without manual Xcode interaction.
- AUv3 Plugin Debugging: Efficiently test Audio Unit (AUv3) extensions within their host apps by automating the build-install-launch cycle, ensuring the plugin is correctly registered in the simulator environment.
- Environment Automation: Simplifies the management of iOS simulators by programmatically booting devices, resolving DerivedData paths, and launching apps using bundle identifiers, which is ideal for developers who prefer a CLI-first or AI-assisted workflow.
| name | run-ios-simulator |
|---|---|
| description | Build and run an iPlug2 iOS app in the iOS Simulator |
Run iOS App in Simulator
Use this skill when the user wants to run an iPlug2 iOS project in the iOS Simulator.
Workflow
Identify the project:
- If not specified, look for
.xcworkspacefiles in the repo root - Ask user to choose if multiple projects exist
- If not specified, look for
Check available simulators and get UDID:
xcrun simctl list devices available | grep -E "iPhone|iPad"Extract the UDID from the output (the value in parentheses, e.g.,
9E866BC3-9E64-4608-B4D0-D20F1DE3E980)Or programmatically:
xcrun simctl list devices available -j | jq -r '.devices[] | .[] | select(.name=="[DeviceName]") | .udid'Build for Simulator:
xcodebuild -workspace [Project]/[Project].xcworkspace \ -scheme "iOS-APP with AUv3" \ -configuration Debug \ -destination 'platform=iOS Simulator,name=[DeviceName]' \ buildFind the built app:
find ~/Library/Developer/Xcode/DerivedData -name "[Project].app" -path "*Debug-iphonesimulator*" -type d 2>/dev/null | head -1Boot simulator and install (use UDID, not "booted"):
open -a Simulator xcrun simctl boot [UDID] 2>/dev/null || true xcrun simctl install [UDID] "[path/to/Project.app]"Using the UDID ensures the correct simulator is targeted even when multiple are running.
Launch the app (use UDID):
# Get bundle ID from Info.plist /usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "[path/to/Project.app]/Info.plist" xcrun simctl launch [UDID] [bundle.identifier]
Notes
- No code signing required for Simulator builds
- Always use UDID to target a specific simulator, not
booted - Default device: iPhone 17 Pro (or latest available)
- The AUv3 plugin is embedded in the app and will be available to host apps in the Simulator
- Use
xcrun simctl list devices availableto see all device options - If
jqis not installed, extract UDID manually fromxcrun simctl list devices availableoutput
Example
For TemplateProject on iPhone 17 Pro:
# Get the UDID for iPhone 17 Pro
UDID=$(xcrun simctl list devices available -j | jq -r '.devices[] | .[] | select(.name=="iPhone 17 Pro") | .udid')
# Build
xcodebuild -workspace TemplateProject/TemplateProject.xcworkspace \
-scheme "iOS-APP with AUv3" -configuration Debug \
-destination "platform=iOS Simulator,id=$UDID" build
# Install and run using UDID
open -a Simulator
xcrun simctl boot $UDID 2>/dev/null || true
xcrun simctl install $UDID ~/Library/Developer/Xcode/DerivedData/TemplateProject-*/Build/Products/Debug-iphonesimulator/TemplateProject.app
xcrun simctl launch $UDID com.AcmeInc.TemplateProject