设备 'iPad Pro (12.9-inch) (2nd generation)' 不在可用模拟器列表中

Device 'iPad Pro (12.9-inch) (2nd generation)' not in list of available simulators

我希望有人知道如何处理我在 运行 fastlane 快照

之后收到的错误

Error setting value '["iPhone 11 Pro Max", "iPhone 8 Plus", "iPad Pro (12.9-inch) (2nd generation)", "iPad Pro (12.9-inch) (3rd generation)"]' for option 'devices' [!] Device 'iPad Pro (12.9-inch) (2nd generation)' not in list of available simulators 'iPhone 8, iPhone 8 Plus, iPhone 11, iPhone 11 Pro, iPhone 11 Pro Max, iPad Pro (9.7-inch), iPad Pro (11-inch), generation), Apple TV, Apple TV 4K, 1080p), Apple Watch Series 4 - 40mm, Apple Watch Series 4 - 44mm, Apple Watch Series 5 - 40mm, Apple Watch Series 5 - 44mm'

我仔细检查了 Xcode (11.1)。我在模拟器列表中确实有 iPad Pro(12.9 英寸)(两代),但不知何故,在调用 fastlane 快照时它没有被拾取。在我从 10.3 更新后,我将两代 iPad Pro(12.9 英寸)添加到 Xcode,因为 Xcode 为 11.1 删除了这两个模拟器。所以我认为可能是添加这两个 post 更新导致了这个问题。

我有 运行 xcrun simctl list 来获取可用模拟器的列表,并可以确认它们存在于列表中。

如果有人有任何建议,请告诉我。

根据要求,快照文件:

devices(["iPhone 11 Pro Max", "iPhone 8 Plus","iPad Pro (12.9-inch) (2nd generation)","iPad Pro (12.9-inch) (3rd generation)"])

languages(["en-GB","en-US","fr-FR"])

scheme("Example_UITests") output_directory("./fastlane/screenshots") clear_previous_screenshots(true) number_of_retries(0) reinstall_app(true)

Xcode 中安装的模拟器列表图片:

您需要执行以下操作才能获得 iPad Pro(12.9 英寸)(第 2 代)

xcrun simctl create "iPad Pro (12.9-inch) (2nd generation)" "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation-"

您可以按照 this apple forum topic 中的说明进行添加:

Xcode 11 by default only includes a simulator for "iPad Pro (12.9-inch) (3rd generation)", but you can install a simulator for "iPad Pro (12.9-inch) (2nd generation)":

Open Xcode Window > Devices and Simulators Select Simulators tab. The list of your current siumulators should appear in the the left sidebar of the window. Click the "+" at the bottom of the sidebar. The "Create a new simulator" sheet should appear. Click the Device Type menu and select "iPad Pro (12.9-inch) (2nd generation)" Click Create

Then you can create screenshots for the "iPad Pro (12.9-inch) (2nd generation)" using your new old simulator.

我目前正在使用 xcode 11.3.1,它运行良好。