XCUITest Simulator architecture appears to be unsupported by the Appium
Asked Answered
T

2

2

I am trying to test my react native iOS app in saucelabs(appium). Saucelabs require a file zip of .app folder created after the xcode build.

I am using following steps(bitrise steps) to create the .app folder and the zip file. 1) Set Xcode Project Build Number 2) Xcode Archive & Export for iOS

Once the zip file is created it is uploadedin the saucelabs.

When I execute the tests in saucelabs, I get the following error from the appium server.

> 2018-06-20 08:58:53:668 - [XCUITest] *********************************
> 2018-06-20 08:58:53:669 - [XCUITest] Simulator architecture appears to be unsupported by the '/var/folders/s9/gmkmk07d6gq_pt_v72yyt8xc0000kr/T/tmpFzu0Wp/test.app' application. Make sure the correct deployment target has been selected for its compilation in Xcode.
> 2018-06-20 08:58:53:669 - [XCUITest] Don't be surprised if the application fails to launch.
> 2018-06-20 08:58:53:669 - [XCUITest] *********************************

When I downloaded the zip from the bitrise and test the zip in local appium server, I got the same error.

But when I create a new build from local MacBook system using Xcode, it works perfectly file in saucelabs as well as in local appium server.

What is the proper way to create a build for saucelabs iOS test using bitrise?

Tetraspore answered 21/6, 2018 at 8:54 Comment(1)
The Xcode Archive & Export for iOS step creates a iOS Device archive, not a Simulator one. If you want to run an ios app in simulator you have to build for the simulator; the simulator and device builds are not compatible with each other. It can only be either for simulator or for real device.Matelote
T
3

use -sdk iphone-simulator to make a .app build. Then create a zip file and upload it to saucelabs

Tetraspore answered 5/7, 2018 at 9:39 Comment(0)
S
0

For a more complete answer, you will have to zip the .app, e.g. zip -r IOS.zip IOS.app/ then copy the full path to that .zip and use it with this script below:

$name is the name of the zip and how you will reference it on Sauce Storage $path is the absolute path to the zip on your build machine / local computer.

#!/usr/bin/env bash

export SAUCE_USERNAME
export SAUCE_ACCESS_KEY

curl \
      --progress-bar \
      -u "${SAUCE_USERNAME}":"${SAUCE_ACCESS_KEY}" \
      -X POST \
      -H "Content-Type: application/octet-stream" \
      -H "Connection: Keep-Alive" \
      -H "Keep-Alive: timeout=180, max=4000" \
      "https://saucelabs.com/rest/v1/storage/""${SAUCE_USERNAME}""/$name?overwrite=true" --data-binary @"$path" ||
      exit
Stinker answered 6/1, 2020 at 22:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.