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

2

43

I was hoping someone would know what to do with this error I am receiving after running fastlane snapshot

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'

I have double checked Xcode (11.1). I do have the iPad Pro (12.9-inch) (both generations) in the simulator list but somehow it isn't picked up when calling fastlane snapshot. I added the two iPad Pro (12.9-inch) generations to Xcode after I updated from 10.3 as Xcode removed these two simulators for 11.1. So I think maybe adding these two post update is causing the issue.

I have ran xcrun simctl list to get the list of available simulators and can confirm they are present on the list.

If anyone has any suggestions please let me know.

As requested, the Snapfile:

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)

Image of the list of simulators installed in Xcode: List of iOS simulators List of iOS simulators

Intimate answered 23/10, 2019 at 13:32 Comment(6)
Have you tried reinstalling xcode?Permeance
Did you edit the console message? Because there's a random "generation)," after "iPad Pro (11-inch)" in the list of available simulators. Also are you using the latest version of fastlane?Boreas
@Boreas I have reinstalled xcode and that additional "generation)," is in the message, I've lifted the response straight from terminal without editing. Yeah I'm using the latest version of fastlane and xcode.Intimate
Can you go into Window > "Devices & Simulators" > "Simulators" tab, and post a screenshot of the side menu and the simulator with the issue?Boreas
@Boreas Thanks for adding the image correctly, I've added a screenshot. Unfortunately the window does not let me expand past the limited width on the sidebar so i have just selected the problem simulator.Intimate
Could you try to specify the ios version on the snapfile? with the parameter [ios_version]. By default snapshot takes the last version of iOS, but my guess is because iOS13.1 is still not prepared for fastlane and it tries to find iOS13. If this doesn't work I would try to delete the simulators you have and build another ones with iOS13.Woodshed
F
64

Here's what you need to do to get iPad Pro (12.9-inch) (2nd generation):

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

Furnishing answered 29/12, 2019 at 15:7 Comment(4)
I had to first enter: sudo xcode-select -s /Applications/Xcode.app to get my PATH sorted out, then I could enter this command and it worked. Thank you.Dyane
To find the available runtimes type: xcrun simctl listTarver
You can leave off the runtime argument and it will just use the default (latest) runtime.Smack
@dpjanes :D good to know that you're doing good.Furnishing
A
33

You can add as described in 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.

I am currently using xcode 11.3.1 and it worked very well.

Algae answered 30/6, 2020 at 10:25 Comment(1)
This was simple.Hallmark

© 2022 - 2024 — McMap. All rights reserved.