I’ve been testing an iOS app via the ipa file on Appium 1.5.3 via tethered iPhones (running iOS 9.3). I have Xcoce 7.3 on the Macbook that I test on. I need to start testing on iOS Simulators (iOS version 9.x is fine for now) and I’m having a problem getting the app to launch. What I’ve done:
Extracted the .ipa file to get the “.app” file. The ipa file came from the Developers who built the app with Xcode 8.2 and has a Dev’s signature. Again, this ipa file works fine in Appium via a tethered iPhone running iOS 9.3.
Changed Appium Server config (and Eclipse Java code) to point to the “app” file, setup the simulator (and code) name/version to the simulator configuration.
When I launch the Inspector or a TestNG test via Eclipse, the Simulator boots up, installs the app, the app opens but then closes immediately. This opening/closing of the app happens about 8 times in succession. The Appium Server log shows:
[debug] [Instruments] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
[debug] [Instruments] Attempting to launch instruments, this is try #1
[Instruments] Launching instruments
[debug] [Instruments] Attempting to run app on iPhone 6s Plus (9.3) [
[Instruments] On xcode 7.0+, instruments-without-delay does not work, skipping instruments-without-delay
[debug] [Instruments] Found Insruments-Without-Delay: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-instruments/thirdparty/iwd7
[debug] [Instruments] Spawning instruments with command: '/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /var/folders/hv/z0cp2_j10xv5369mc3h7j1br3gw1kr/T/appium-instruments/instrumentscli0.trace -w "iPhone 6s Plus (9.3) [" /Users/appium/ipa/CompanyQA.app -e UIASCRIPT "/Users/leppo/Library/Application Support/appium/bootstrap/bootstrap-830a1e8114b80f74.js" -e UIARESULTSPATH /var/folders/hv/z0cp2_j10xv5369mc3h7j1br3gw1kr/T/appium-instruments'
[debug] [Instruments] And launch timeouts (in ms): {"global":90000}
[debug] [Instruments] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.company.mobile.inhouse.qa'
[debug] [Instruments] Instruments exited with code 253
[Instruments] Error launching instruments: Instruments crashed on startup
[debug] [iOSSim] Killing all iOS Simulators
Does anybody know what could be wrong? Should I be able to extract the “app” file from the ipa file and use it in a Simulator, or does the app file need to be built separately? From what I understand about Appium 1.6x/iOS 10x, if I would upgrade Xcode to 8.x on the Mac that I test on, my scripts won’t work anymore using Appium 1.5.3. I know I need to eventually upgrade Appium to 1.6x and test on iOS 10, but for now I'm just trying to run my current test on a Simulator running iOS 9.x instead of on an iPhone running 9.3.