Is iOS simulator setup possible?

Hi all,

We currently have Android automation set up to run with an emulator but we have to run iOS automation via a Mac Mini and a physical device. Is it at all possible to run iOS on a simulator on the same box we use to run Android? Thank you in advance.

Yes, that is possible and the setup for the simulator is the same as for the real device. However, you wonā€™t have Apple Store on simulator so you need to install the app using a ipa file.
One other thing to consider is that ipa for real device differs from the one for the simulator because of the processor architecture. The iOS dev team should know how to build for both

1 Like

Oh wow that is great news. The ipa files we already place in a location for RIDE to pick up and install, so all good there. Currently Android is running on a windows box and has and emulator, but for iOS which simulator software should we use? As far as I know there are no iOS devices on the emulator we use for Android

You can create and start your iOS simulator on the mac-mini directly using xCode by going to Windows->Devices and Simulators.
You will find there a list of simulators with different ID and OS. Using the id, you can start the simulator using this command in the terminal: open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID <device-id>

1 Like

Oh yes I started looking at that but then stopped because the I wasnā€™t sure how to make RIDE see the emulator instead of the actual device. But it sounds like I need to look a bit deeper at the configuration before it will work so Iā€™ll give that a go again. Thank you so much for the answers, I wasnā€™t expecting it to be possible so happy now. Thanks

From a robot test point of view it is just a matter of telling it on which device id to launch the application so thatā€™s how you get from real device to simulator. Thatā€™s it.

1 Like

I see and that would be somewhere under test settings or one of those after I launch RIDE.py? Please excuse my ignorance, Iā€™m picking up where it was left and learning as I go.

If you use AppiumLibrary you probably use the Open Application keyword to run the app. That requires arguments like device id, application package and so on. I donā€™t know your infrastructure but there should be something like this. So, in order to start the app on the simulator instead of real device you just modifu the udid parameter in the Open Application command or in the start of the Appium Server itself. Ride is just an editor, you can use many more which are more friendly: Pycharm, VS Vistual Studio Code

1 Like

Ok gotcha thank you. Iā€™ll give it a bash, much appreciated! :grinning:

I disagree on the non friendiness of RIDE :frowning:

2 Likes

Iā€™m getting an error stating that it canā€™t find the device, but I suspect I have some more config to do somewhere.

We use ā€œInstall And Start Application | ${APP}ā€ and specify the install location somewhere for the .ipa file which works with a physical device. But Iā€™m having another issue now, and our Dev says the automation builds does have the architecture to run on simulators but I still get this error:

WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Simulator architecture is unsupported by the ā€˜/var/folders/hp/_hj1t_d172xbdzt0012b9j2r0000gp/T/2021813-4971-ehadc5.lmct/TestAppName.appā€™ application. Make sure the correct deployment target has been selected for its compilation in Xcode.

Iā€™ll have to dig some more

Thanks for sharing, Very helpful for me, Really appreciate.

1 Like

:joy: :joy: :joy: :joy:
I think you are the only one :slight_smile:

Hi @Inky80 did you ever get a fix for this ?
or @zastress do you know of something ?

as im getting the same on our ipa build.

Im trying to install and run it on simulator but i realise that it has to do with the type of build im getting through the iOS devā€™s pipelines.

Should they be signing it with a certain Cert to run on the Simulator in xcode ?

No not yet. Will need to get back to solving this soon again.