在模拟器选择中使用GUID而不是iOS版本号的XCode [英] XCode using GUID instead of iOS version number in Simulator Selection

查看:129
本文介绍了在模拟器选择中使用GUID而不是iOS版本号的XCode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在上个月进行XCode的各种更新期间,iOS版本从我的模拟器选择中删除(下图.)有人知道如何解决此问题吗?

Somewhere during the various updates of XCode in the last month, the iOS versions dropped from my simulator selection (image below.) Anyone know how to resolve this?

推荐答案

如何修复

Xcode使用设备版本来消除具有相同名称的设备的歧义. 如果两个设备具有相同的名称和版本号,它将使用设备的UDID.

Xcode uses the device version to disambiguate devices with the same name. If two devices have the same name and version number, it will use the devices' UDIDs.

一堆设备(例如,iPhone 5s)中的每一个都有4个.我怀疑其中一些是针对同一iOS版本的.您应该删除一些重复项.检出xcrun simctl listxcrun simctl delete或使用Xcode.app中的设备管理器(单击-"删除设备).

You have 4 of each of a bunch of devices (eg iPhone 5s). I suspect that some of them are for the same iOS version. You should delete some of the duplicates. Check out xcrun simctl list and xcrun simctl delete or use the device manager within Xcode.app (click on the "-" to delete a device).

如何回到默认状态

# Ensure all possible clients of CoreSimulatorService are no longer running:

killall Xcode 2> /dev/null
killall Instruments 2> /dev/null
killall 'iOS Simulator' 2> /dev/null
killall Simulator 2> /dev/null
killall 'Simulator (Watch)' 2> /dev/null
killall ibtoold 2> /dev/null
killall simctl 2> /dev/null
# There may be others

# Kill the service itself
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

# Remove all the data and logs
rm -rf ~/Library/*/CoreSimulator

为什么会发生这种情况:

CoreSimulatorService将监视/Library/Developer/CoreSimulator/Profiles中新模拟器运行时的添加(例如,从Xcode-> Preferences-> Downloads下载它们时).安装新的运行时时,CoreSimulatorService将为该运行时创建一组初始设备.

CoreSimulatorService will monitor for the addition of new simulator runtimes in /Library/Developer/CoreSimulator/Profiles (eg, for when downloading them from Xcode -> Preferences -> Downloads). When installing a new runtime, CoreSimulatorService will create an initial set of devices for that runtime.

如果同时运行多个CoreSimulatorService实例,则会出现此问题.每个CoreSimulatorService实例将创建自己的设备集(但其客户端最初只会看到该实例的集).在随后的启动中(例如:重新启动后),将看到两个副本.由于在与使用已发布的Xcode.app相同的登录会话中测试Xcode.app的Beta版本,或者在更新之前和之后都使用Xcode.app,因此可能进入一种状态,即同时运行CoreSimulatorService的多个副本通过App Store.

This problem arrises if there are multiple instances of CoreSimulatorService running at the same time. Each CoreSimulatorService instance will create its own set of devices (but its clients will only see that instances's sets at first). On subsequent launches (eg: after a reboot), both copies will be seen. One can get into a state where multiple copies of CoreSimulatorService are running at the same time due to testing beta versions of Xcode.app in the same login session as using the released Xcode.app or by having used Xcode.app before and after updating it through the App Store.

如果您知道可能会出现此错误的任何其他方式,请在 http://bugreport.apple.com

If you are aware of any other way that this bug might come about, please file a new radar at http://bugreport.apple.com

这篇关于在模拟器选择中使用GUID而不是iOS版本号的XCode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆