Henning Luther Henning Luther - 4 months ago 12
iOS Question

Can i create an iOS simulator programatically on demand like in android(emulator)

In android i can create an emulator with

android create avd
and all the properties i want to have. Is there a way to do this in MacOs/Xcode via commands or can i only address the built-in simulators provided by xcode?
If not, is there a way to start a simulator in MAcOs several times?

Background is automated testing and building an environment on demand.

I didn't find anything in the internet so i guess the answer is no and no way.

Edit: Would at least be nice to leave a comment when downvoting

Finally: As accepted answer says -> No. Only one simulator possible at a time.

Answer

AFAIK you can only use the simulators provided by Xcode - but that should really be all you need. There are fewer variations in hardware in iOS than Android, so there shouldn't be any settings or properties to apply.

As far as running the Simulator app as much as you want, you can certainly do that. The simulator is an app on your computer just like anything else.

Mine is located here (I also believe this is the default path):

/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app

I added my simulator app to my dock so I can launch it anytime (also helps with debugging website layout for mobile devices)

Hope this helps.

EDIT: If you need to open from the command line:

open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app

will do it

Comments