Test Environment
Desktop OS/version used to run Appium:Version 1.2.0-beta.3 (1.2.0-beta.3)
Node.js version (unless using Appium.app|exe):
Mobile platform/version under test:ios simulator
iPhone 6s plus 10.2
1.Pulled latest code from sourcetree
2.opened xcode
3.made a archive file
4.got the app file from there.
5.opened Appium desktop app
6.added the desired capabilities
.{
"app": "/Users/Desktop/PreProd.app",
"platformName": "iOS",
"deviceName": "iPhone 6s Plus",
"platformVersion": "10.2",
"automationName": "XCUITest"
}
8.The app opens and crashes
appium log file
try to follow the below tutorial for real device setup
https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md
If it is done already, restart your device and MAC once and try executing again.
To run in simulator, you should get the .app file from simulator folder NOT from the xcode archives.
The architecture for the archived build will be arm64/armv7, which can only be installed in real device.
To get .app file for Appium test in simulator :
Open project in Xcode --> expand your project --> expand products --> you will see .app file there.Go to file location and copy .app file.
You can use this .app file for Appium test in simulator.
Note : this only help if you have access to Source code. If you don't have access to source code to run the project and only have archived build, then only option you have is to run it in real device.
The application crashes because the .app
file you are trying to launch is either
- Not simulator compatible
- Not bundled and compiled with the current simulator architecture
- Has incorrect bundle id
Try building the .app
file for the simulator using the xcode command
xcodebuild -arch x86_64 -sdk iphonesimulator11.3 -workspace {projectname}.xcworkspace -scheme {schemaname} -configuration {configurationname} SYMROOT=${WORKSPACE}/build/{projectname}.xcarchive
Once the .app
file is generated, use that and try launching.