升级为Xcode15后,iOS17的Simulator,如手动下载安装模拟器
并采用以下方式安装模拟器,会以镜像形式加载模拟器,镜像形式安装不能修改Lib目录,不能手动覆盖libstdc++.6.0.9.tbd、libstdc++.6.tbd、libstdc++.tbd。:
xcode-select-s/Applications/Xcode.appxcodebuild-runFirstLaunch xcrun simctl runtimeadd"~/Downloads/iOS_17_Simulator_Runtime.dmg"
需采用以下步骤安装模拟器:
1.去这里选择下载iOS17的模拟器文件Download
2.双击iOS_17_Simulator_Runtime.dmg文件,等待打开后,逐层找到Runtimes文件夹。
3.选择 Xcode 15 App,然后右击选择Show Package Content,通过Contents —> Developer —> Platforms —> iPhoneOS.platform —> Library —> Developer —> CoreSimulator,找到Profiles文件夹。
4.将第 2 步的Runtimes文件夹拷贝到第 3 步的Profiles文件夹中。
5.打开/重启 Xcode 15,此时模拟器已成功安装。
基于github上的libstdc。执行以下脚本来实现覆盖libstdc++.6.0.9.tbd、libstdc++.6.tbd、libstdc++.tbd
xocde15.sh
#!/bin/bash
# Asking sudo
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
echo '1'
sudo cp 1/* /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 17.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
echo '2'
sudo cp 2/* /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
echo '3'
sudo cp 3/* /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
echo '4'
sudo cp 4/* /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/lib/
echo '5'