Closed aharbick closed 7 years ago
I'm pretty sure this is because
xcrun simctl list devices
Is not reporting iPad Pro as this
iPad Pro (9.7 inch) (94B87E6E-51EA-41BA-BDAD-DDA3246712E3) (Shutdown)
iPad Pro (12.9 inch) (C0F6C6F5-80EA-497C-86AD-02A5176E1D30) (Shutdown)
And the regexps in simctl/lib/simctl-list-parser.js are not expecting the "(12.9 inch)" in the names for the devices.
Another problem is that
xcrun simctl list devicetypes
Uses a format for the name of the device
iPad Pro (12.9-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
I monkeyed around with simctl-list-parser.js over in the simctl wrapper. Doing that I got ios-sim showdevicetypes to work.
Here's the commit in my fork: https://github.com/aharbick/simctl/commit/37028f97d93113fee9ed852a29bd0a321cc0e7c5
I'd submit a PR, but I don't have a good enough sense of the process or the potential impacts elsewhere in the ecosystem.
Let me know how else I can help.
Thanks! evaluating this now in simctl.
Fixed in https://github.com/phonegap/simctl/issues/11 after adding failing tests. I will push a new simctl version and use it in a new ios-sim release
It still does not show iPad Pro!
$ ios-sim --version
5.0.9
$ xcrun simctl list devicetypes
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
iPhone 7 (com.apple.CoreSimulator.SimDeviceType.iPhone-7)
iPhone 7 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus)
iPhone SE (com.apple.CoreSimulator.SimDeviceType.iPhone-SE)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
iPad Air 2 (com.apple.CoreSimulator.SimDeviceType.iPad-Air-2)
iPad Pro (9.7-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-)
iPad Pro (12.9-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
Apple TV 1080p (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)
Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)
Apple Watch Series 2 - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm)
Apple Watch Series 2 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm)
$ ios-sim showdevicetypes
iPhone-5, 10.0
iPhone-5s, 10.0
iPhone-6, 10.0
iPhone-6-Plus, 10.0
iPhone-6s, 10.0
iPhone-6s-Plus, 10.0
iPhone-7, 10.0
iPhone-7-Plus, 10.0
iPhone-SE, 10.0
iPad-Retina, 10.0
iPad-Air, 10.0
iPad-Air-2, 10.0
Apple-TV-1080p, tvOS 10.0
Apple-Watch-38mm, watchOS 3.0
Apple-Watch-42mm, watchOS 3.0
Apple-Watch-Series-2-38mm, watchOS 3.0
Apple-Watch-Series-2-42mm, watchOS 3.0
Did I miss something? The fork aharbick/simctl@37028f9 lists the two iPad Pros also:
$ ios-sim showdevicetypes
iPhone-5, 10.0
iPhone-5s, 10.0
iPhone-6, 10.0
iPhone-6-Plus, 10.0
iPhone-6s, 10.0
iPhone-6s-Plus, 10.0
iPhone-7, 10.0
iPhone-7-Plus, 10.0
iPhone-SE, 10.0
iPad-Retina, 10.0
iPad-Air, 10.0
iPad-Air-2, 10.0
iPad-Pro--9-7-inch-, 10.0
iPad-Pro, 10.0
Apple-TV-1080p, tvOS 10.0
Apple-Watch-38mm, watchOS 3.0
Apple-Watch-42mm, watchOS 3.0
Apple-Watch-Series-2-38mm, watchOS 3.0
Apple-Watch-Series-2-42mm, watchOS 3.0
Looks like Apple is not being consistent in their device type names for the iPad Pros:
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
iPhone 7 (com.apple.CoreSimulator.SimDeviceType.iPhone-7)
iPhone 7 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus)
iPhone SE (com.apple.CoreSimulator.SimDeviceType.iPhone-SE)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
iPad Air 2 (com.apple.CoreSimulator.SimDeviceType.iPad-Air-2)
iPad Pro (9.7-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-)
iPad Pro (12.9-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
Apple TV 1080p (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)
Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)
Apple Watch Series 2 - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm)
Apple Watch Series 2 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm)
== Devices ==
-- iOS 8.2 --
Resizable iPad (D7465DA6-D5F7-49C2-9DED-29C22AF40E09) (Shutdown) (unavailable, device type profile not found)
Resizable iPhone (FD05A655-E0D1-4D8A-9D3B-04F84D494F21) (Shutdown) (unavailable, device type profile not found)
-- iOS 8.4 --
Resizable iPad (163B7304-376C-4AF4-A0B6-88A5A8DE660D) (Shutdown) (unavailable, device type profile not found)
Resizable iPhone (89B34D5F-C365-44A3-8D75-1369EB36EF49) (Shutdown) (unavailable, device type profile not found)
-- iOS 10.1 --
iPad Pro (9.7 inch) (C7EC634B-5F7A-41E0-800E-8CE62B367F12) (Shutdown)
iPad Pro (12.9 inch) (1835A74E-E4F6-4BAD-8000-C8712B642730) (Shutdown)
Note the hyphen in iPad Pro (9.7-inch)
in Device Types
and the one in Devices
. ios-sim filters only those devicetypes that are in the runtimes as well since we need to get the device id.
Right. Which is (unfortunately) why I had to do this in my commit:
The fix here would be for ios-sim to hack this by (pseudocode):
if (device.name.startsWith('iPad Pro')) {
// replace hyphens with spaces in the name
}
@aharbick great! my patch is essentially the same, although I'm limiting the reach of this hack by the conditional
I'll get a 5.10 patch out asap
Hacking this in ios-sim
only, since technicallysimctl
is correct in reporting the output
Tested and published https://github.com/phonegap/ios-sim/releases/tag/5.0.10
Wow! That was fast! And it works, thank you!!
I updated this release but I still can't see iPad Pro in cordova emulate ios --list
but ios-sim showdevicetypes
shows the device:
iPhone-5, 10.1
iPhone-5s, 10.1
iPhone-6, 10.1
iPhone-6-Plus, 10.1
iPhone-6s, 10.1
iPhone-6s-Plus, 10.1
iPhone-7, 10.1
iPhone-7-Plus, 10.1
iPhone-SE, 10.1
iPad-Retina, 10.1
iPad-Air, 10.1
iPad-Air-2, 10.1
iPad-Pro--9-7-inch-, 10.1
iPad-Pro, 10.1
Apple-TV-1080p, tvOS 10.0
Apple-Watch-38mm, watchOS 3.1
Apple-Watch-42mm, watchOS 3.1
Apple-Watch-Series-2-38mm, watchOS 3.1
Apple-Watch-Series-2-42mm, watchOS 3.1
Am I missing something?
For cordova issues, try filing an issue at http://issues.cordova.io instead
@sagrawal14 filing a new issue for this, found the problem: #202
Thanks @shazron. I saw the commit, great!
Command and results (I've got iOS 10 and 9.3 simulators installed and I can launch the iPad-Pro 9.7 and 12.9 devices in the simulator but this is the result of my command.
Further if I try to install an app into the simulator like so
I get this error
Below is the requested version information.
sw_vers
ios-sim --version
xcodebuild -version
xcode-select --print-path
gcc --version