You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xcode 16.2编译失败:AssetCatalogSimulatorAgent启动及iOS模拟器运行时异常

修复Xcode 16.2无法识别iOS 18.2模拟器运行时的问题

问题概述

Mac MINI(M1 2020,macOS 15.3.1)使用Xcode 16.2编译项目时,修改xib/storyboard或向Assets目录添加资源后编译失败,报错如下:

No available simulator runtimes for platform iphonesimulator. SimServiceContext supportedRuntimes=[]
Failed to launch AssetCatalogSimulatorAgent via CoreSimulator spawn
iOS 18.2 Platform not installed

Xcode组件设置显示iOS 18.2已安装,但重新下载、手动安装模拟器运行时均无效,常规修复手段(重启、重装Xcode、重置CoreSimulator、新建用户等)均无法解决。

复现步骤

  • 新建Mac用户
  • 从App Store下载最新版Xcode 16.2
  • 创建全新App项目
  • 向Assets目录添加图片资源
  • 切换目标设备为模拟器并配置签名
  • 执行编译,触发失败;跳过添加资源步骤则编译正常

有效修复方案

方案1:手动注册模拟器运行时并重置CoreSimulator

  1. 打开终端,执行命令查看已安装的模拟器运行时:
    xcrun simctl list runtimes
    
    若输出无iOS 18.2,手动确认运行时安装路径:/Library/Developer/CoreSimulator/Profiles/Runtimes/,检查是否存在iOS 18.2.simruntime文件夹。
  2. 若路径存在但未被识别,执行以下命令重置服务并注册运行时:
    sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
    rm -rf ~/Library/Developer/CoreSimulator/Devices
    rm -rf ~/Library/Developer/CoreSimulator/DeviceSets
    xcrun simctl runtime add "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime"
    
  3. 重启Xcode后尝试编译。

方案2:修复模拟器运行时权限

M系列芯片设备可能存在权限异常,执行以下命令修复:

sudo chown -R $(whoami):staff /Library/Developer/CoreSimulator/Profiles/Runtimes/
sudo xattr -r -d com.apple.quarantine /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 18.2.simruntime

完成后重启Xcode,重新选择模拟器目标编译。

方案3:降级Xcode版本

若上述方案无效,暂时降级到Xcode 16.1版本(该版本对iOS 18.2模拟器运行时兼容性更稳定),待Apple推送Xcode 16.2修复更新后再升级。

内容的提问来源于stack exchange,提问作者LetynSOFT

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 12:28:15