Xcode 15 overheating and drains battery on M2

I bought a MacBook Air M2 a few days ago. Today I started using Xcode 15 to learn iOS development. But as soon as I turn on the simulator, I notice that my mac gets very hot and drains a lot of battery. Is there any solution for that? I repeat the MacBook is brand new.

I'm not 100% sure if it's exactly your case, but it worked for me. Simulators are somewhat buggy in the new Xcode. Run this in Terminal:

/usr/libexec/PlistBuddy /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Library/Wallpaper/Collections/Collections.plist -c "add order array" -c "add order: string 23EC2CF1-0188-49FC-B214-EC1AB37FE5C4"

Solution was taken from here.

It's the same thing as it was with the Xcode 14 first release. I hope it helps.

Hi, @pashlya ! I was coding for about 30 minutes with the preview and simulator on, 11 browser tabs on, a couple of applications on and connected to a second monitor. With all that, my mac didn't heat up a bit, which is great! But it lost about 7% of the battery, now I don't know if it's a lot, but since I used it all and was connected to second monitor, it seems ok to me? What do you think?

I didn't use your solution because I downloaded a new version of macOS so I wanted to test first if that was the problem (and it seems to be) so far everything seems to be working fine. If I have any problems in the future, I will let you know

This issue also occurs on the MacBook Air M1 (16/512). Previewing SwiftUI canvas (Xcode 15.0) causes the processor temperature to continuously rise to 70 degrees Celsius and rapidly depletes the battery. Even when the application is closed (not Force Closed), the MacBook remains hot (the Activity Monitor shows that 40% of the CPU resources are still running the Simulator). The only way to cool down the MacBook is by Force Closed both Xcode and the Simulator.

Xcode 15 overheating and drains battery on M2
 
 
Q