-
Notifications
You must be signed in to change notification settings - Fork 986
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
iOS: Fix running cordova build ios for emulators with Xcode 10.1 (ß) #428
Conversation
simctl json format changed with Xcode 10.1, so without this fix "cordova build ios" will fail when built on a mac without a physical device attached to.
Codecov Report
@@ Coverage Diff @@
## master #428 +/- ##
=======================================
Coverage 74.29% 74.29%
=======================================
Files 12 12
Lines 1564 1564
=======================================
Hits 1162 1162
Misses 402 402 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks for opening a PR for this!
I'm going to wait until Xcode 10.1 is released before merging this, just in case they make any more changes between now and then, but I'll make sure this gets into the next cordova-ios major version release :)
@dpogue Makes sense, thanks. Let's hope Apple does not anything stupid (again) until then. |
to downgrade to xcode 10, unistall xcode beta and command line tools beta and reinstall the oficial version? |
I tried this but no luck. |
** BUILD SUCCEEDED ** with that |
Xcode 10.1 is now released. If someone has time to confirm that this works with the release version, I'll get it merged :) |
Updating xcode now... |
Good thing waiting for the release. Now the JSON is like this:
So "availability" is back to be backward compatible while "isAvailable" has been turned into a boolean as I would have expected in the first place. While there is no need anymore for this PR to fix an actual bug it could be a good idea to check for "isAvailable" if present. Going for "availabiltiy" seemed to be the best possible in the past because no other indicator was present, but from now on we should probably go for "isAvailable". What's your thoughs about this? |
Yeah, I think it makes sense to check for |
I will change the PR accordingly (or issue a new one if that isn't possible) when I am back at the office tomorrow. |
Made a new one: #451 |
Xcode's simctl json format has changed with Xcode 10.1, so without this fix "cordova build ios" will fail when built on a mac without a physical device attached to.
New Format running xcrun simctl list --json:
Platforms affected
Mac OS X, iOS
What does this PR do?
Fix scanning for available emulators to build / run against.
What testing has been done on this change?
Tests have been run on a Mac mini with Mac OS X 10.3 and Xcode 10 + Xcode 10.1 ß installed.
Checklist
Reported an issue in the JIRA database
Not possible, because I am unable to create a new issue there. Apache Cordova is not shown in the List of available projects though I am able to search and find for issues on it.
Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
See above.
Added automated test coverage as appropriate for this change.