Reputation: 1526
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.
I have checked the "Open using Rosettea" option for Xcode but it still not running M1 machine.
Upvotes: 18
Views: 17880
Reputation: 41
I have a M2 Mac, and I do not see "Open with Rosetta" option in the Finder -> Get Info.
When I run the command file $(which xcodebuild)
I'm able to see:
/usr/bin/xcodebuild: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/xcodebuild (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/xcodebuild (for architecture arm64e): Mach-O 64-bit executable arm64e
which indicates my Xcode is able to build both architectures.
I need to tell which architecture my Xcode should be able to build. When I open the Xcode by:
arch -arm64 /Applications/Xcode.app/Contents/MacOS/Xcode
I no longer see this error and can run on simulator without any issue.
Upvotes: 1
Reputation: 2561
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
Upvotes: 0
Reputation: 129
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!
Upvotes: 7
Reputation: 87
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)
Solution 2
Edit Scheme -> Run -> Debug executable
Check this checkbox
this works for me!
Upvotes: 1
Reputation: 4451
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.
Upvotes: 14
Reputation: 321
I also updated Xcode to 14.0 and MacOS to Ventura, I was getting a similar message.
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.
Click on Edit Scheme, located at the bottom.
Select the Run option on the left and select Automatically on the Launch section.
Upvotes: 1
Reputation: 841
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..
Upvotes: 0
Reputation: 5287
I had a problem running watchOS simulator.
Solution that worked for me:
Upvotes: 27
Reputation: 111
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
Upvotes: 11