-1

I looking for the rosetta simulator name in fastfile to run a lane in server. I am trying to run using "iPhone 14 (Rosetta)"

But the error in terminal says it doesn't know this device name "iPhone 14 (Rosetta)"

Can anyone help writing this lane so that our test case can run in the server for "iPhone 14 (Rosetta)"?

soundflix
  • 928
  • 9
  • 22
  • Hi! First rosetta is a conversion layer from x86 to arm for computer running Apple M ships (arm). Saying iPhone 14 (Rosetta) means that you want to use the simulator design for x86 ships into an Apple M ship, I don't see any reason for this since Apple M ships have a simulator directly made for Apple silicon. On top of that there is a good chance that your server is not using Apple silicon and therefore is automatically on x86 simulator and therefore "Rosetta" doesn't mean anything for it. I would try to remove the "(Rosetta)" completely and let the machine choose the right simulator. – La pieuvre Aug 22 '23 at 07:54
  • 1
    @Lapieuvre unit tests from our SDK runs only on rosetta stimulators. so if I just provide device name iPhone 14 without specifying rosetta it doesn't run. even in the Xcode itself we need to run unitTestcase scheme on iPhone 14 (Rosetta) – Navdeep Singh Aug 22 '23 at 08:46
  • That weird! Rosetta simulator means "x86 instruction converted to ARM". So iPhone 14 (Rosetta) simulator ONLY exist in Apple Silicon machines, they are in opposition of "iPhone 14" simulator that are for Apple Silicon. On none Apple Silicon machine, iPhone 14 simulator are automatically x86 because there is nothing else. DO you have a specific reason for needing the x86 version of the simulator? – La pieuvre Aug 22 '23 at 08:59
  • Please post the error message you get. – soundflix Aug 22 '23 at 09:00
  • My device MacBook Pro M1 chip and below is the error in terminal 1)WHEN I SPECIFY ROSETTA Ignoring 'iPhone 14 (Rosetta', couldn’t find matching simulator Couldn't find any matching simulators for '["iPhone 14 (Rosetta"]' - falling back to default simulator 2)WHEN ROSETTA IS NOT DEFINED The bundle “UnitTests” couldn’t be loaded because it doesn’t contain a version for the current architecture. The bundle doesn’t contain a version for the current architecture. Try installing a universal version of the bundle – Navdeep Singh Aug 22 '23 at 09:59
  • Is it normal that a parenthesis is missing on the error message ? 'iPhone 14 (Rosetta' instead of 'iPhone 14 (Rosetta)' did you write it correctly on your fast lane config ? – La pieuvre Aug 22 '23 at 11:06
  • Yes even though its correct ERROR IS THERE Ignoring 'iPhone 14 (Rosetta)', couldn’t find matching simulator Couldn't find any matching simulators for '["iPhone 14 (Rosetta)"]' - falling back to default simulator – Navdeep Singh Aug 22 '23 at 12:12
  • To be sure you have a problem with running your test in command line, but it works fine in Xcode? If that's so how do you launch you Xcodebuild command line? do you use the -arch parameter with x86_64? – La pieuvre Aug 22 '23 at 13:51
  • No, I haven't define arch in x86_64. example for UI test cases I have only defined the device[iPhone 11] and it works fine. Issue is only with Unit test cases for the framework SDK – Navdeep Singh Aug 22 '23 at 16:00

1 Answers1

0

I found the solution actually in my settings of app -> excluded architectures-> x86(was set)

So just removed it from there and this made it worked.