15

I just shifted my Xcode project from my Intel Mac to Apple M1 Chip. The code is compiled successfully on M1 Chip but once I tried to run it on simulator it shows the following error.

debugserver is x86_64 binary running in translation, attached failed.

Xcode simulator Error

I have checked the "Open using Rosettea" option for Xcode but it still not running M1 machine.

Qazi Ammar
  • 953
  • 1
  • 8
  • 23

9 Answers9

24

I had a problem running watchOS simulator.

Solution that worked for me:

  • Quit Xcode
  • Right click on Xcode, press "Get Info"
  • Make sure that "Open using Rosetta" is not selected(see image)
  • Delete derived data(don't know if this is required)
  • Reopen Xcode and run your app

img1

stackich
  • 3,607
  • 3
  • 17
  • 41
14

With Mac M1 you could also exclude arm64 in your target

Target > Build Settings > Excluded Architectures --> add "arm64"

If an update isn’t available from the vendor, temporarily use the EXCLUDED_ARCHS build setting to exclude arm64 for the simulator SDK as shown in the figure below. Do not exclude arm64 for any other SDK.

change this setting only for iOS Simulator

Arshad Shaik
  • 1,095
  • 12
  • 18
Thermech
  • 4,371
  • 2
  • 39
  • 60
  • "arm64e" was already there. However changing it into "arm64" did not solve the problem. – stackich Aug 16 '22 at 06:38
  • @Thermech if we exclude arm64 there will be any problem with the app ? – Arshad Shaik Mar 23 '23 at 11:23
  • @ArshadShaik To avoid any impact, you could exclude it only for iosSimulator like proposed by Apple here https://developer.apple.com/documentation/technotes/tn3117-resolving-build-errors-for-apple-silicon#Update-pre-compiled-libraries-from-vendors – Thermech Mar 23 '23 at 11:38
11

I was facing the same issue trying to open the Apple Watch Simulator, but I was able to fix it by disabling Rosetta in the xcode.

Mac M1 Xcode 13.4.1 WatchOs 8.5

Diego Arena
  • 111
  • 3
5

Assuming its not solved yet, can you try the following and let us know -

Solution 1

It's an issue with authorization. Try this in the Terminal:

sudo DevToolsSecurity -enable

It may ask you to enter your mac password so kindly do that.

Solution 2

Edit Scheme -> Run -> Debug executable

uncheck this checkbox it will be ok!

Ky -
  • 30,724
  • 51
  • 192
  • 308
1

I also updated Xcode to 14.0 and MacOS to Ventura, I was getting a similar message.

main_issue

The problem for me was my team member accidentally selected "Wait for the executable to be launched" in our scheme settings. Changing it to "Automatically", worked for me.

Click on your scheme to reveal your schemes and scheme settings.

demo_scheme

Click on Edit Scheme, located at the bottom.

Select the Run option on the left and select Automatically on the Launch section.

run_scheme

Hem Poudyal
  • 321
  • 6
  • 16
0

Set debug under Build Active Architecture Only to Yes

0

Sometimes I get this issue and the only way I could get it to work was to first run the app on terminal:

npx react-native run-ios

then reopen xcode and run it again..

Yoannes Geissler
  • 791
  • 1
  • 9
  • 18
0

Im using macOS M1 Pro, XCode 14.2

I had a problem running iOS simulator.

Solution that worked for me:

Solution 1 (uncheck Rosetta on Xcode 14.2)

  • Quit Xcode
  • Right click on Xcode, press "Get Info"
  • Make sure that "Open using Rosetta" is not selected(see image)
  • Delete derived data(don't know if this is required)
  • Reopen Xcode and run your app

Solution 2

Edit Scheme -> Run -> Debug executable

Check this checkbox

this works for me!

dimaskpz
  • 81
  • 8
0

If you have multiple versions of Xcode installed (including Xcode 14.3) you may need to perform the following song and dance:

https://stackoverflow.com/a/72946533/731285

markshiz
  • 2,501
  • 22
  • 28