Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does XCode signal an app to stop while running in the simulator

In the typical build and run sequence of XCode, you often have your app still running in the iPhone simulator from the last time. XCode helpfully asks if you would like to stop the executable before it installs and runs the newest build.

But how does XCode signal the iPhone simulator to stop the application?

And could I write a step into my build sequence to do the same to save having to dismiss this dialog?

like image 937
user342492 Avatar asked May 21 '10 15:05

user342492


People also ask

How do I use iPhone simulator in Xcode?

To launch a Simulator without running an appChoose Xcode > Open Developer Tool > Simulator. Control-click the Xcode icon in the Dock, and from the shortcut menu, choose Open Developer Tool > Simulator.

How do I run Xcode on simulator?

Open Xcode and click Menu > Xcode > Preferences > Select Components, and then choose the simulator version you want to download. When a simulator is opened from AppStudio, AppStudio Player automatically installs (if necessary) and opens in it.

Where does the iPhone simulator store its data?

type: ~/Library/Application Support/iPhone Simulator. The Directories are the iOS version of the different Simulators. The Sub Directories are the Apps install on the simulator.

Do I need Xcode for iOS simulator?

Launching the Simulator, though, always requires opening Xcode and going to Developer Tools. Because the Simulator. app is embedded within the Xcode app bundle, apps like LaunchBar won't find it to index it.


1 Answers

Applications in the simulator are full fledged processes. Anything that will kill a process can kill a simulated app. If you are debugging the process then gdb will trap the signal instead of letting the app die, so you have to kill gdb too. Something like this should do it:

killall gdb-i386-apple-darwin
killall $(PRODUCT_NAME)
like image 92
drawnonward Avatar answered Oct 09 '22 20:10

drawnonward