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

Remove unnecessary call to fixSimCtlList in showsdks #221

Merged
merged 1 commit into from
Sep 20, 2017

Conversation

kelvindart
Copy link

@kelvindart kelvindart commented Sep 20, 2017

At the moment, a call to

ios-sim showsdks

Fails to run with the error:

Cannot convert undefined or null to object

The call to fixSimCtlList(...) is unrequired. This references two properties in regards to the simulators: devicetypes and devices. We are concerned with the SDKs, not simulators at this point, so the call is unnecessary.

More details in the bug report: #220.

@shazron
Copy link

shazron commented Sep 20, 2017

Ouch, my bad. I'm going to write unit tests first before pulling this in so this doesn't happen again...

@kelvindart
Copy link
Author

@shazron - ha, I noticed you was working late that night fixing the Xcode 9 issues... it's permissible 😉

@kelvindart
Copy link
Author

Btw, I haven't checked whether the other references to fixSimCtlList are valid. I will do so now.

@kelvindart
Copy link
Author

@shazron - I have just checked, from what I can tell, the other calls are fine.

Ironically, the issue is because showsdks passes the runtimes filter to simctl via the options parameter. I was digging around in that repo, and as a result, when it runs xcrun simctl list runtimes --json, it removes every other key from the returned JSON object, I'm not sure where this changed.

Other calls to simctl do not specify a filter, so everything is returned.

However, I believe this to now be fine. I would assist with the unit tests but that is less my forte. 😅

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

Successfully merging this pull request may close these issues.

3 participants