Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I start the iPhone simulator without "Build and Run"?

I want to delete an app in the simulator before I "build and run". How can I start the simulator so I can do the deletion? If I start it by "build and run" I get a long log output that takes a while because of a bug I'm trying to fix. I'd like to avoid that.

like image 595
RobertL Avatar asked Feb 19 '11 02:02

RobertL


People also ask

How do I open my iPhone simulator?

To launch a Simulator without running an app Do one of the following: Choose 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 set up iPhone simulator?

Open the iOS simulator, if it's not already open. From the Hardware menu, select Device, and then select the type of device you want to simulate. The simulator window will change to match the dimensions of the device you selected.

Can we run iOS simulator without Xcode?

You would have to extract the Simulator pkg from the Xcode DMG. The only thing is that the Simulator depends on having an SDK installed, that way it knows which iOS to run the app in.

How does the iPhone simulator work?

An iOS Simulator basically mimics an iOS app or browser on top of a developer's operating system. This is viewable in an iPad or iPhone like window. They cannot virtualize the actual hardware conditions of an iOS device, which is the main requirement for comprehensive testing and debugging.


2 Answers

The simulator is just an application, and as such you can run it like any other application.

To run the simulator straight from terminal prepend these locations with the open command

Xcode 7.x, 8.x, and 9.x

In Xcode 7.x, the iPhone Simulator has moved again: /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app.

Xcode 6.x

In Xcode 6.x, the iPhone Simulator has moved yet again, and now resides here: /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app.


Xcode 4.x, 5.x

In Xcode 4.x (through 4.5 on Mountain Lion) and Xcode 5.0.x on Mavericks, it lives here: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/

In my version of Xcode (4.5.2), I find it quite convenient to use the Open Developer Tool menu from either the dock icon or the Xcode menu:

open iOS Simulator


Xcode 3.x

In Xcode 3.x, it lives here:

/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app


In some future version of Xcode, it will probably move again, it's a squirrelly little app.

like image 67
Seth Avatar answered Sep 24 '22 18:09

Seth


From Terminal you can use:

open -a iPhone\ Simulator open -a iOS\ Simulator open -a Simulator 

This all depends on the application name of the simulator, this can change with each iteration of Xcode.

like image 39
atreat Avatar answered Sep 23 '22 18:09

atreat