My solution to solve Unable to boot the iOS simulator

Today, when I restart my computer, and I want to start the Simulator with the following command:

My solution to solve Unable to boot the iOS simulator

Today, when I restart my computer, and I want to start the Simulator with the following command:open -a Simulator

But it report Unable to boot the iOS simulator error, this is the way I tried to solve the problem.

Investigate the log file

I find the error message from /Library/Logs/CoreSimulator/CoreSimulator.log , but the message is not helpful, the message are like below:Jun 21 15:55:26 <ComputerName> CoreSimulatorService[994] <Error>: Could not register service com.apple.gputools.agent.producer.sim: Failed to lookup com.apple.gputools.agent.producer.sim: 0x44e
Jun 21 15:55:35 <ComputerName> CoreSimulatorService[994] <Error>: Unable to boot simulator session com.apple.CoreSimulator.SimDevice.FE3B6CB8-AA93-47B6-874F-8C59CBB563E3 (isTimeout = YES): Error Domain=com.apple.SimLaunchHostService.RequestError Code=4 "Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding" UserInfo={NSLocalizedDescription=Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding}
Jun 21 15:55:35 <ComputerName> CoreSimulatorService[994] <Error>: Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedFailureReason=launchd failed to respond., NSLocalizedDescription=Unable to boot the Simulator., NSUnderlyingError=0x600000405fe0 {Error Domain=com.apple.SimLaunchHostService.RequestError Code=4 "Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding" UserInfo={NSLocalizedDescription=Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding}}}

Recreate Simulator from Xcode

Then I try to delete the Simulator from Xcode, and recreate a new Simulator, but the Simulator still can’t start.

Delete cache files

The last things is that I delete the large files, the files that I deleted are as below:~/Library/Caches
~/Library/Developer/CoreSimulator/Caches
~/Library/Developer/Xcode/iOS\ DeviceSupport/ # all subfolders except 15.5 (19F77) arm64e
~/Library/Developer/Xcode/DerivedData/

I delete these folders because the first two is the cache folder, the think the problem might caused by the cache files.

I delete all subfolders under ~/Library/Developer/Xcode/iOS\ DeviceSupport/ because I only test iOS 15.5, and every version is spend 3–5 GB spaces.

I deleted the contents inside ~/Library/Developer/Xcode/DerivedData/ because the content in this folder is the apps that we build, and they also spend a lot of space in my computer.

After delete these files, I create a new Simulator, and aha the Simulator started.

Read more

AI读经 - 马太福音 第7章

AI读经 - 马太福音 第7章

这段经文出自《马太福音》第7章,是耶稣“登山宝训”的总结部分,主题集中在信徒的内在生命与外在行为。主要内容包括不论断他人(1-5节)、寻求神的帮助(7-12节)、选择生命的道路(13-14节)、提防假先知(15-20节)、真信徒的生命表征(21-23节)、以及听道与行道的重要性(24-27节)。这些教导旨在呼召信徒过敬虔和真实的生活,表现出神国的公义与恩典。

By Stephen Li