[xcode] ios simulator: how to close an app

When you "run" the simulator from xCode, the app automatically launches, and then you can click the home button to suspend the app. What I want to do is close the app from within the simulator. So, how can this be done?

This question is related to xcode ios7 ios6 ios-simulator simulator

The answer is


Window / Show Device Bezels

And now you can see the real device, so double tap on HOME button and kill you app


For iOS 7 & above:

  • shift+command+H twice to simulate the double tap of home button
  • swipe your app's screenshot upward to close it

You'll see screenshots representing the apps suspended on your device - those screenshots respond to touch events. Swiping is the gesture you'll make to "fling" the screenshot off of the screen. Note that on machines where your mouse is intended to represent your finger, you'll click and swipe as if it is your finger tapping and making the gesture.


On the new iPhone X, the simulator was having issues with the mouse/finger gesture.

You can do a long press with the mouse and a close icon will appear. You can use the swipe up gesture as well to close the app.

close app on simulator


You can use this command to quit an app in iOS Simulator

xcrun simctl terminate booted com.apple.mobilesafari

You will need to know the bundle id of the app you have installed in the simulator. You can refer to this link


For closing (not quit) the running application in Simulator the keyboard shortcut is "shift+command+h".


Command + shift +h Press H 2 times

Note :- Press H 2 times


Double click on the home button and then click and hold the icon like a normal phone and then click close I believe.


I had a difficult time in finding a way in XCode 7.2, but finally I had found one. First press Shift+Command+ H twice. This will open up all the apps that are currently open.

Swipe left/right to the app you actually want to close. Just Swipe Up using the Touchpad while Holding the App would close the app.


You can also kill the app by process id

ps -cx -o pid,command | awk '$2 == "YourAppNameCaseSensitive" { print $1 }' | xargs kill -9

Examples related to xcode

Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 iPhone is not available. Please reconnect the device Make a VStack fill the width of the screen in SwiftUI error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1 Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Xcode 10: A valid provisioning profile for this executable was not found Xcode 10, Command CodeSign failed with a nonzero exit code

Examples related to ios7

Xcode: Could not locate device support files How to Apply Gradient to background view of iOS Swift App How do I hide the status bar in a Swift iOS app? Using Predicate in Swift How do I programmatically set device orientation in iOS 7? What is the height of Navigation Bar in iOS 7? Warning :-Presenting view controllers on detached view controllers is discouraged Color Tint UIButton Image iOS change navigation bar title font and color How to embed small icon in UILabel

Examples related to ios6

ios simulator: how to close an app Is it possible to install iOS 6 SDK on Xcode 5? How to change navigation bar color in iOS 7 or 6? Detect if the app was launched/opened from a push notification The operation couldn’t be completed. (com.facebook.sdk error 2.) ios6 Evenly space multiple views within a container view how to fix the issue "Command /bin/sh failed with exit code 1" in iphone Setting font on NSAttributedString on UITextView disregards line spacing How do I animate constraint changes? What are Unwind segues for and how do you use them?

Examples related to ios-simulator

The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1 flutter run: No connected devices Error Running React Native App From Terminal (iOS) How to uninstall downloaded Xcode simulator? Capture iOS Simulator video for App Preview iPhone 6 Plus resolution confusion: Xcode or Apple's website? for development How to enable native resolution for apps on iPhone 6 and 6 Plus? How to access iOS simulator camera Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." Document directory path of Xcode Device Simulator

Examples related to simulator

Adjusting the Xcode iPhone simulator scale and size ios simulator: how to close an app Can I install the "app store" in an IOS simulator?