Open simulator xcode 14 by Rosetta to fix scroll
Asked Answered
C

5

11

I just updated to xcode 14, and it seems the simulator can't run with Rosetta to fix scroll lag. Does anyone have a solution that can help me? thank you

This is photo can not open by Rosetta is here

Update: Thanks for all you guys help We have 2 solutions:

  1. (Recommended) James Risner and Manu 's solution: Force open simulator by terminal. First you need force quit simulator, than open it by terminal, keep the terminal when using simulator.
  2. Guillaume S 's solution: add new permissions admin/user for Xcode.app, Simulator.app, Simulator's Content file and Info.plist. Then, follow Guillaume S 's answer

Xcode 14.1 update: These solutions can't work anymore. So don't update now, Hope Apple will fix this problem soon

Coleencolella answered 13/9, 2022 at 9:37 Comment(15)
Same issue, following this thread hoping for a solution too.Moncrief
@JamesRisner I believe he's referring to the very jumpy scrolling that the Xcode 14 simulator exhibits when opened without Rosetta on.Hales
@JamesRisner If my simulator open without Rosetta, My app can not scroll smooth. developer.apple.com/forums/thread/668488 this issue happen when run on apple siliconColeencolella
The core issue ("scroll lag") is also now fixed in Xcode 14.1.Coston
not fixed for me. What changed is this fix doesn't work anymore, so now im permanently stuck without scrolling momentum on iOS Simulators and have to use real device for devTheogony
@JoGro Which solutions are you choosing? I'm using first solution, it still workingColeencolella
the first one as well, (arch -x86_x64 /path_to_simulator.app). The "scroll lag" i have is the lack of scrolling momentum when running x86_64 apps in Simulator, which was normally fixed by running Simulator in Rosetta. Now it doesn't work and scrolling momentum is permanently missing in all x86_64 apps. ARM64 apps work fine in ARM64 Simulator but this was always the case.Theogony
Same for me with Xcode 14.1 :/Moncrief
@GuillaumeS. I thought in Xcode 14.1 they fixed it, I'm going to update 14.1 today, do you have any advice?Coleencolella
@Dagg Tuan I rollbacked to 14.0.1, it didn't work for me. I filed a new radar with info for Apple. Hopefully they'll fix it for good in next release.Moncrief
I opened a radar for it. The issue is still there in 14.1. I've narrowed it down though. It's the app store version. I installed Xcode from the developer portal twice and the app store version twice. App store was reproducible both times and the portal version didn't have the issue. @JeremyHuddlestonSequoia fyiFructificative
That is weird. They should be exactly the same...Coston
Yea it is weird. In case this helps anyone. One thing I just noticed is if I expand the 14.1 .xip file and run Xcode from downloads folder the tableview's scrolling is fine. If I move Xcode to the Applications folder, the issue reappears (was trying to clean up my downloads folder haha). To your point @JeremyHuddlestonSequoia the builds are probably the same but the App Store puts Xcode into the applications folder by default.Fructificative
any news on this? Still the same with Simulator Version 14.3 (994) and Xcode Version 14.3 (14E222b) - poke @JeremyHuddlestonSequoiaMoncrief
Still investigating... sorry for the non-updateCoston
S
14

Solution for Xcode 14.0 (not working for Xcode 14.1 & 14.2)

Open the terminal and type :

arch -x86_64 /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator

This forces the use of Rosetta.

Sportscast answered 14/9, 2022 at 12:9 Comment(2)
Works for me. I am on Xcode 14, using react-native-maps. Without using Rosetta, map drag has huge inertia, i.e. a tiny drag would result in gigantic change on the map view. After forcing Rosetta on the simulator, the inertia is now tolerable.Ante
any luck for xcode 14.2Seller
C
5

Launching Simulator.app under Rosetta is not supported and should not be needed. I am not aware of any issue which would require this.

You probably want to either boot the device in Rosetta or spawn some process in Rosetta, eg:

xcrun simctl boot <UDID> --arch=x86_64

or

xcrun simctl spawn <UDID> --arch=x86_64 ...

Additionally, if your app is x86_64-only, it will launch fine in a sim booted as arm64.

Note: Editing any files within Xcode.app will break its signature, meaning updates will fail to apply which will trigger a full download of Xcode.app (after first downloading and failing to apply a delta update). If you really need to launch Simulator.app as x86_64, use:

arch -x86_64 /path/to/Xcode.app/Contents/Developer/Applications/Simulator.app/MacOS/Simulator

or even create an alias in your ~/.zshrc, so you can just run sim:

alias sim='arch -x86_64 $(xcode-select -p)/Applications/Simulator.app/Contents/MacOS/Simulator'

AND file a radar about why you feel you need to do this at http://feedback.apple.com.

Followup: Thanks to whomever filed the radar about the HID issue with Simulator.app running as arm64 native after I posted this. The issue has been fixed in Xcode 14.1.

Coston answered 26/9, 2022 at 19:0 Comment(13)
Yes you are right. About your comment "I am not aware of any issue which would require this." You should research "Mac Silicon M1 react native iOS simulator scroll lag inertia" and you'll see that a lot of people are experiencing this issue that is not present with running the Simulator with Rosetta.Moncrief
That very well may be so, but nobody has reported it to Apple AFAIK. I have not seen any bug report about it. Please file a radar at feedback.apple.com for that issue and include simctl diagnose and sudo sysdiagnose -q or it is not likely to be addressed.Coston
Thanks to whomever just filed one!Coston
Sorry, just saw your comment now. I’m glad that somebody did filed it. It’s really weird that no radar were there before because it’s been present since 2 or 3 Xcode/simulator versions already. Since the release of M1 MacBooks I think. Thanks again for your hard work Jeremy!Moncrief
@GuillaumeS The core issue (HID issues when Simulator.app is running as arm64) has been addressed in Xcode 14.1 RC (developer.apple.com/documentation/xcode-release-notes/…), so you should not need to do this hack any more. Thanks for reporting the bug.Coston
I've sent you a new radar file with diagnose files for Xcode 14.1. It still is not working and even launchin with your command above doesn't work anymore. FB11749373 (Xcode 14.1 Simulator scrolling inertia lagging)Moncrief
Please also take note of Jo Gro comment above, quote is: "The "scroll lag" i have is the lack of scrolling momentum when running x86_64 apps in Simulator, which was normally fixed by running Simulator in Rosetta. Now it doesn't work and scrolling momentum is permanently missing in all x86_64 apps. ARM64 apps work fine in ARM64 Simulator but this was always the case." #73701196Moncrief
Big lack of professionalism in the answer of my radar file on feedback.apple.com as seen on this screenshot. I am running under Xcode 14.1 and this issue IS STILL HERE. PLEASE FIX IT. imgur.com/a/MYc0mq3Moncrief
There are a few levels of screening between external filers and engineers. I suspect it may have been a response from someone that didn't realize you were reporting against a version we thought was fixed. I am aware there are reports it isn't fully fixed and will be looking into it more.Coston
Super! Thanks a lot Jeremy, looking forward to this!Moncrief
@JeremyHuddlestonSequoia thank you for looking into this. Is there any news on it? 🙈.. Just got my new M2 Max macbook, just to find out that I can't use the simulator for my purposes.Penelopa
The problem is still there on XCode 14.3.1Drumbeat
Yeah, we identified the issue and it's with the appropriate team to fix... =/Coston
T
3

You can follow the below steps:

enter image description here

enter image description here

Tillery answered 15/12, 2023 at 8:15 Comment(0)
R
2

Applications built with this Property List Key LSRequiresNativeExecution enabled forbid using Rosetta in launch services.

An excerpt from the Apple Documentaion:

... this key prevents the system from using the Rosetta translation process to execute the Intel portion of a universal app on Apple silicon.

A word of caution if using the simulator with Rosetta. There are known issues with the simulator, for example floating point exceptions do not work. So graphical apps may not work correctly.

You can force starting the simulator in Intel mode with Rosetta by use of this command:

arch -x86_64 /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator

sim

Rees answered 13/9, 2022 at 13:51 Comment(0)
M
2

Thanks to James' answer above, I found a temporary fix.

Add user/system permissions to the Simulator.app inside Xcode.app, the Contents folder inside Simulator.app and the Info.plist file inside too and modify this Info.plist by adding the following keys:

Architecture priority array with 1 item (Intel (32-bit) by default)

Application requires native environment Boolean with NO as value.

Cleanup everything and rebuild/run and it should fix the scroll lag issue.

Thanks again James Risner for this.

Moncrief answered 13/9, 2022 at 15:24 Comment(2)
How to give permission? I gave it read & write from info tab, still not working.Levinson
right click on the .app and get info > at the bottom of the info box you will have permissions. Click on the lock at the bottom right to enable permissions for you/admin and it should do the trick. Remember to do that for every folder/file before modifying the Info.plist in order to save your changes inside the file. But the recommended answer by James above is the great so far! Mine was tricky and before he found the command line to run the app in arch x86 which would enable Rosetta.Moncrief

© 2022 - 2025 — McMap. All rights reserved.