Comments (10)
The problem is the output of xcrun simctl list --json
:
Thats a runtime:
"runtimes" : [
{
"bundlePath" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 11.3.simruntime",
"availabilityError" : "",
"buildversion" : "15E217",
"availability" : "(available)",
"isAvailable" : true,
"identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
"version" : "11.3",
"name" : "iOS 11.3"
},
Those are devices:
"devices" : {
"iOS 12.1" : [
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 5s",
"udid" : "DA69902D-B4FC-46E3-9465-D48D0C04B5BB",
"availabilityError" : ""
},
vs.
"devices" : {
"com.apple.CoreSimulator.SimRuntime.iOS-11-4" : [
{
"availability" : "(unavailable, runtime profile not found)",
"state" : "Shutdown",
"isAvailable" : false,
"name" : "iPhone 5s",
"udid" : "43416A47-F7D3-4F57-8729-776F22323D88",
"availabilityError" : "runtime profile not found"
},
findRuntimesGroupByDeviceProperty
tries to find the runtimes by using the name
property. In the second case it's not grouped by the name
its grouped by identifier
.
I do not know enough about this project to create a PR. But a quick fix is to change the findRuntimesGroupByDeviceProperty
function inside /usr/local/lib/node_modules/ios-sim/src/lib.js
from
available_runtimes[ runtime.name ] = (runtime.availability === '(available)');
to
available_runtimes[ runtime.identifier] = (runtime.availability === '(available)');
David
Edit: Just for clarity: the second device comes from a different machine that groups them by identifier.
They use 2 different Xcode versions.
from ios-sim.
Thanks @davlhd!
With your fix I now get a list of devices when running ios-sim showdevicetypes
.
However, when I run ionic cordova emulate ios --list
I still get an empty list - do you know why?
I have tried to remove and add the ios platform afterwards.
from ios-sim.
Should be fixed in v8.0 (upcoming release)
from ios-sim.
Thank you for the quick respons @shazron !
Any ETA on v8.0? Or can I manually downgrade to get it to work until?
from ios-sim.
Already released.
from ios-sim.
Hi @shazron
I've just updated by running
npm install -g ios-sim
ios-sim --version
returns 8.0.0
But ios-sim showdevicetypes
still returns an empty list
Im I doing something wrong?
from ios-sim.
Hmm I'm getting the right devices with ios-sim 8. However I don't have iOS 11 Sims installed maybe that's why:
$ ios-sim showdevicetypes
Apple-TV-1080p, tvOS 12.1
Apple-TV-4K-4K, tvOS 12.1
Apple-TV-4K-1080p, tvOS 12.1
Apple-Watch-Series-2-38mm, watchOS 5.1
Apple-Watch-Series-2-42mm, watchOS 5.1
Apple-Watch-Series-3-38mm, watchOS 5.1
Apple-Watch-Series-3-42mm, watchOS 5.1
Apple-Watch-Series-4-40mm, watchOS 5.1
Apple-Watch-Series-4-44mm, watchOS 5.1
iPhone-5, 10.3
iPhone-5, 9.3
iPhone-5s, 10.3
iPhone-5s, 12.1
iPhone-5s, 9.3
iPhone-6, 10.3
iPhone-6, 12.1
iPhone-6, 9.3
iPhone-6-Plus, 10.3
iPhone-6-Plus, 12.1
iPhone-6-Plus, 9.3
iPhone-6s, 10.3
iPhone-6s, 12.1
iPhone-6s, 9.3
iPhone-6s-Plus, 10.3
iPhone-6s-Plus, 12.1
iPhone-6s-Plus, 9.3
iPhone-7, 10.3
iPhone-7, 12.1
iPhone-7-Plus, 10.3
iPhone-7-Plus, 12.1
iPhone-SE, 10.3
iPhone-SE, 12.1
iPad-Air, 10.3
iPad-Air, 12.1
iPad-Air, 9.3
iPad-Air-2, 10.3
iPad-Air-2, 12.1
iPad-Air-2, 9.3
iPad--5th-generation-, 10.3
iPad--5th-generation-, 12.1
iPad-Pro--9-7-inch-, 10.3
iPad-Pro, 10.3
iPad-Pro--12-9-inch---2nd-generation-, 10.3
iPad-Pro--12-9-inch---2nd-generation-, 12.1
iPad-Pro--10-5-inch-, 10.3
iPad-Pro--10-5-inch-, 12.1
iPhone-8, 12.1
iPhone-8-Plus, 12.1
iPhone-X, 12.1
iPad-Pro--9-7-inch-, 12.1
iPad-Pro--9-7-inch-, 9.3
iPad-Pro, 12.1
iPad-Retina, 9.3
iPad--6th-generation-, 12.1
iPhone-XS, 12.1
iPhone-XS-Max, 12.1
iPhone-XR, 12.1
iPad-Pro--11-inch-, 12.1
iPad-Pro--12-9-inch---3rd-generation-, 12.1
iPhone-4s, 9.3
iPad-2, 9.3
Note that ionic/cordova bakes in a version of ios-sim that might be older.
from ios-sim.
Added the iOS 11.4 simulator, I still can't repro the problem, output seems normal:
$ ios-sim showdevicetypes
Apple-TV-1080p, tvOS 12.1
Apple-TV-4K-4K, tvOS 12.1
Apple-TV-4K-1080p, tvOS 12.1
Apple-Watch-Series-2-38mm, watchOS 5.1
Apple-Watch-Series-2-42mm, watchOS 5.1
Apple-Watch-Series-3-38mm, watchOS 5.1
Apple-Watch-Series-3-42mm, watchOS 5.1
Apple-Watch-Series-4-40mm, watchOS 5.1
Apple-Watch-Series-4-44mm, watchOS 5.1
iPhone-5, 10.3
iPhone-5, 9.3
iPhone-5s, 10.3
iPhone-5s, 12.1
iPhone-5s, 9.3
iPhone-5s, 11.4
iPhone-6, 10.3
iPhone-6, 12.1
iPhone-6, 9.3
iPhone-6, 11.4
iPhone-6-Plus, 10.3
iPhone-6-Plus, 12.1
iPhone-6-Plus, 9.3
iPhone-6-Plus, 11.4
iPhone-6s, 10.3
iPhone-6s, 12.1
iPhone-6s, 9.3
iPhone-6s, 11.4
iPhone-6s-Plus, 10.3
iPhone-6s-Plus, 12.1
iPhone-6s-Plus, 9.3
iPhone-6s-Plus, 11.4
iPhone-7, 10.3
iPhone-7, 12.1
iPhone-7, 11.4
iPhone-7-Plus, 10.3
iPhone-7-Plus, 12.1
iPhone-7-Plus, 11.4
iPhone-SE, 10.3
iPhone-SE, 12.1
iPhone-SE, 11.4
iPad-Air, 10.3
iPad-Air, 12.1
iPad-Air, 9.3
iPad-Air, 11.4
iPad-Air-2, 10.3
iPad-Air-2, 12.1
iPad-Air-2, 9.3
iPad-Air-2, 11.4
iPad--5th-generation-, 10.3
iPad--5th-generation-, 12.1
iPad--5th-generation-, 11.4
iPad-Pro--9-7-inch-, 10.3
iPad-Pro, 10.3
iPad-Pro--12-9-inch---2nd-generation-, 10.3
iPad-Pro--12-9-inch---2nd-generation-, 12.1
iPad-Pro--12-9-inch---2nd-generation-, 11.4
iPad-Pro--10-5-inch-, 10.3
iPad-Pro--10-5-inch-, 12.1
iPad-Pro--10-5-inch-, 11.4
iPad-Retina, 9.3
iPhone-8, 12.1
iPhone-8, 11.4
iPhone-8-Plus, 12.1
iPhone-8-Plus, 11.4
iPhone-X, 12.1
iPhone-X, 11.4
iPad-Pro--9-7-inch-, 12.1
iPad-Pro--9-7-inch-, 9.3
iPad-Pro--9-7-inch-, 11.4
iPad-Pro, 12.1
iPad-Pro, 11.4
iPad--6th-generation-, 12.1
iPhone-XS, 12.1
iPhone-XS-Max, 12.1
iPhone-XR, 12.1
iPad-Pro--11-inch-, 12.1
iPad-Pro--12-9-inch---3rd-generation-, 12.1
iPhone-4s, 9.3
iPad-2, 9.3
from ios-sim.
I have the exact same behaviour as @ejerskov .
I also get all the devices using 'ios-sim showdevicetypes' but get not device using 'cordova run ios --list'.
from ios-sim.
This is fixed in [email protected]. cordova-ios has been updated to use the latest ios-sim but it needs a patch release that includes the fix, or you can install the nightly:
cordova platform add ios@nightly
from ios-sim.
Related Issues (20)
- convert module to oclif
- complete coverage for command `install` HOT 1
- complete coverage for command `launch`
- complete coverage for command `start` HOT 1
- List empty of devices simulator with Xcode 10.2 HOT 60
- Log more information about simulator being launched
- List empty of devices simulator with Xcode 11 HOT 3
- Error: Cannot read property 'toLowerCase' of undefined
- --devicetypeid was not specified, using first available device: null. HOT 4
- Add support to non binary Info.plist files
- How to run ios-sim all command through python script
- TypeError: Cannot read property 'devicetypes' of undefined HOT 8
- Unable to install the application in simulator HOT 5
- Unhandled Error: launch.js line 51. this.log undefined. HOT 4
- Custom simulators not appearing in showdevicetypes
- BUG: `npm list` errors on this module on global mode
- Bump simctl to 2.0.1 for security updates
- remove appveyor and travis ci, use Github Actions HOT 2
- node.js 16 test failures HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ios-sim.