Can I run my iOS app with multiple iOS simulators?

Hi All,
I have xcode 6.3.1 installed with latest Appium application for apple. All iOS prerequisites have been installed and Appium Doctor reports all is well.
The dev guys send me the simulator app to test on, I don’t have access to the app xcode project itself.
I can successfully run my python automation on the iPhone 6 simulator.
However, when I try to run the same tests against iPhone 5 or iPad 2, I get errors telling me instruments has crashed. I have two questions:

  1. Do I need to get dev to create seperate builds of the app for iPhone
    6, iPhone 5, iPad simulators?
  2. Is there any way for them to build a simulator app that will work
    across all available iOS simulators?

Thanks very much for any advice offered.
John

What version of Appium are you using, and can you post the Appium server log? You might search this messageboard as I think there are some known issues around later versions of Appium and older simulators.

I have 1.3.7 installed and the very latest xcode simulators. Am I correct in saying that a simulator build should be able to run on ALL iOS simulators?

I built an app myself, and then installed it (same .app file) on the following simulators:

  • iphone 6 8.3
  • iphone 6 plus 8.3
  • iphone 5s 8.3
  • ipad air 7.1
  • ipad retina 7.1
  • iphone 5s 7.1

I used the following command:

xcrun simctl install booted /path/to/your.app

For some reason the app did not work on iphone 4s with 8.3, but I’m mostly sure that it’s the app and not the simulator.

Hi Simon,
That’s what I’m after, running all those simulators off one build. I use python to launch the simulators while the Appium server is listening. Is that also a python command you’re running? Here’s a snippet of how the app is launched:

desired_caps[‘platformName’] = ‘iOS’
desired_caps[‘platformVerison’] = ‘8.3’
desired_caps[‘deviceName’] = ‘iPhone 5’
desired_caps[‘app’] = ‘/Users/tester/Desktop/iOS/File Protect/builds/Simulator/File Protect.app’
desired_caps[‘language’] = ‘fr’
driver = webdriver.Remote(‘http://127.0.0.1:4725/wd/hub’, desired_caps)

This?

xcrun simctl install booted /path/to/your.app

It’s a terminal command, it installs the app on the device.

Thanks Simon, that installed the app for me.
I think the problem is with the app and not with the simulators. I’ll ask the dev guys to build a new simulator app with xcode and I’ll try again.
Thanks for all your help on this.

Did you check your device logs? There might be a clue somewhere in there.

I build the test app International Mountains and it installed fine on the various simulators - it’s must be the app! I’ll get onto the developers and get them to build another.
Thanks for your time Simon.
John

Hi All,
I have xcode 6.4 installed with latest Appium application 1.4 for apple. All iOS prerequisites have been installed and Appium Doctor reports all is well.

I am able to launch my app successfully on iPhone 6 simulator. 8.1, 8.3 n 8.4
However, when I try to run the same tests against iPhone 5 with 8.2 its launch the app and started crashes with error

info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Failed looking up pid of launched process

info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #1
info: [debug] Killall iOS Simulator

but if i installed app from command prompt using this command
xcrun simctl install booted /path/to/your.app

and after that if i launch the app from appium its wroking fine.

is any one know is it a build issue or appium issue ??