Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib.js/getdevicetypes gets wrong list of devices versus showdevicetypes #202

Closed
shazron opened this issue Nov 9, 2016 · 7 comments
Closed
Milestone

Comments

@shazron
Copy link

shazron commented Nov 9, 2016

showdevicetypes should rely on getdevicetypes (the logic should reside there), then print it out (the two commands do two different but related things).

@shazron
Copy link
Author

shazron commented Nov 9, 2016

Published 5.0.11

@aharbick
Copy link

The current version of cordova-ios uses 5.0.7. Maybe a dumb question but how does one override that locally?

I've tried a bunch of things and phongap build ios always seems to grab a fresh copy of cordova-ios into ~/.cordova and uses ios-sim 5.0.7 which means you can't emulate iPad-Pro.

A new release of cordova-ios eventually but I'm looking for some hack / override locally to work around.

@shazron
Copy link
Author

shazron commented Nov 17, 2016

You can override it on a per app basis. The node_modules folder is located in platforms/ios/cordova/node_modules of your app.

In platforms/ios/cordova of your app folder, just run npm install ios-sim which should grab the latest. Unfortunately anything in the platforms folder is a build artifact and may change, so you may want to script this in a hook after adding a platform.

@aharbick
Copy link

OK. That worked thanks! However I don't think that this issue or #197 are actually fixed.

I'm still seeing "No available runtimes could be found for "iPad Pro (12.9-inch)" when trying to run the iPad-Pro device type.

phonegap run ios --target "iPad-Pro" --emulator

The reason seems to still be the inconsistency of the dash in the device/devicetype name. If I change parseDeviceType in simctl-list-parser.js to strip dashes like so

...
'name': matches[1].replace(/\-/g, ' ').trim(),
...

Then the phonegap command works.

@shazron
Copy link
Author

shazron commented Nov 18, 2016

Thanks! I'll take a look, tomorrow.

@aharbick
Copy link

FWIW... I updated my fork to match your previous code and just included my tweak above:

aharbick/simctl@848fba2

@shazron shazron reopened this Nov 28, 2016
@shazron
Copy link
Author

shazron commented Nov 28, 2016

This will be fixed in ios-sim 5.0.12 (I didn't modify simctl, since that lib is meant to report what is output from xcrun simctl, quirks and all).

Tested using:

cordova run ios --target "iPad-Pro--9-7-inch-" --emulator
cordova run ios --target "iPad-Pro" --emulator
cordova run --list

@shazron shazron added this to the 5.0.12 milestone Jun 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants