ios-restart-app
Restart the iOS app on connected iPhone without rebuilding. Terminates and relaunches the app remotely. Use when testing changes that don't require rebuild, or refreshing app state.
When & Why to Use This Skill
The iOS Restart App skill allows developers to remotely terminate and relaunch iOS applications on connected iPhones without performing a full rebuild. By leveraging xcrun devicectl, it optimizes the mobile development lifecycle, providing a high-speed method to refresh app states and test non-code changes in under two seconds.
Use Cases
- 1. Rapid Configuration Testing: Instantly verify changes to external assets, property lists (plists), or local configuration files that do not require Swift/Objective-C recompilation.
- 2. App State Reset: Quickly clear volatile memory and caches to reset the application to its initial launch state during intensive debugging sessions.
- 3. Backend Integration Verification: Refresh the app to test its response to server-side updates or API changes without the overhead of a full deployment cycle.
- 4. UI/UX Iteration: Use as a fast alternative to full builds when testing dynamic layouts or assets that are loaded at runtime.
| name | ios-restart-app |
|---|---|
| description | Restart the iOS app on connected iPhone without rebuilding. Terminates and relaunches the app remotely. Use when testing changes that don't require rebuild, or refreshing app state. |
iOS Restart App
Overview
Restarts the iOS app on a connected iPhone by terminating the existing instance and launching it again. This is useful for testing configuration changes, clearing app state, or refreshing the app without rebuilding.
When to Use
Invoke this skill when the user:
- Asks to "restart the app"
- Wants to "reload the app"
- Says "relaunch on device"
- Mentions refreshing or resetting the app
- Wants to test without rebuilding
Prerequisites
- iPhone connected via USB
- App must be installed on the device (use ios-deploy-usb first if not)
- Device trusted
- The project must be in an iOS app directory
Instructions
Navigate to the iOS app directory:
cd path/to/ios/appRun the restart script:
./restart-app.shThe script will:
- Auto-detect the connected iPhone
- Terminate any running instance of the app
- Launch the app again
- Activate it (bring to foreground)
Inform the user:
- The app has been restarted on the device
- This does NOT rebuild - only restarts the existing installation
- Use ios-deploy-usb if code changes need to be deployed first
Expected Output
🔄 Restarting NoobTest on device...
✅ App restarted
How It Works
The script uses:
xcodebuild -showdestinationsto find the device IDxcrun devicectl device process launchwith--terminate-existingto kill and restart--activateflag to bring the app to the foreground
When to Use vs Deploy
Use restart-app when:
- Testing configuration files or assets that don't require rebuild
- Clearing app state (memory, caches)
- You just want to refresh the running app
- Changes are external (server-side, network config, etc.)
Use ios-deploy-usb when:
- You changed Swift code
- You added/modified UI
- You updated dependencies
- Any code that needs recompilation
Common Issues
No device detected:
- Check USB connection
- Ensure device is trusted
- Try disconnecting and reconnecting
App not installed:
- Run ios-deploy-usb first to build and install
- Verify app appears on iPhone home screen
Device busy:
- Wait a moment and try again
- Stop any other Xcode operations
Speed
This is very fast (< 2 seconds) since there's no build step. It's ideal for rapid iteration when testing non-code changes.
Bundle ID
The script is configured for the specific app's bundle ID. For Firefly/NoobTest, this is com.miso.noobtest. Different apps will have different bundle IDs configured in the script.