-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat: support Xcode 11 #88
Conversation
CR'd and code looks good. I'll test it as soon as I can. |
I'll add the mappings later today as well. Downloading all those sim images is a pain. |
OK, I'll hold off on merging until you say the mappings are updated. Thanks! |
I tried to adding changes in my sdk code base and its working fine on simulator. |
@cb1kenobi I updated the mappings to match all sims installable via Xcode 11. iOS 9 was dropped from the list so I removed it here as well. |
@cb1kenobi Updated! 🚀 |
lib/simulator.js
Outdated
@@ -1209,7 +1209,7 @@ function launch(simHandleOrUDID, options, callback) { | |||
Object.keys(info.devices).some(function (type) { | |||
return info.devices[type].some(function (sim) { | |||
if (sim.udid === handle.udid) { | |||
if (/^booted$/i.test(sim.state) && (sim.availability === '(available)' || sim.isAvailable)) { | |||
if (sim.isAvailable || /^booted$/i.test(sim.state) && (sim.availability === '(available)')) { |
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.
Close, but no cigar.
if (/^booted$/i.test(sim.state) && (sim.isAvailable || sim.availability === '(available)')) {
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.
brain.isAvailable
condition failed, sorry.
APPROVED!!! |
Should I do the timob one as well? |
@hansemannn go for it! :) |
Please add the link to the timob PR to the ticket. |
Added via tidev/titanium-sdk#10942 |
@@ -354,7 +354,7 @@ function shutdown(params, callback) { | |||
return callback(new Error(__('Unable to find Simulator %s', params.udid))); | |||
} | |||
|
|||
if (sim.availability !== '(available)') { | |||
if (!sim.isAvailable && sim.availability !== '(available)') { |
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.
This seems to cause issues in incremental builds using Xcode 10. I think it should use the logical-or instead of the logical-and. @cb1kenobi What do you think?
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.
Oh, because an undefined sim.isAvailable
is falsey. Crap. Just need a sim.isAvailable === false
.
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.
That does not seem to solve it for me. Can you try to reproduce? Steps:
- Run an app with Xcode 10 (
ti build -p ios
) - Repeat 1
Expected: Currently active sim is reused
Actual: [ERROR] Invalid iOS simulator "EAA90239-AB96-481F-B08E-31C1C83BE1B5"
If you close the simulator and wait ~5 seconds, it works again. So it has to be something with the booted state.
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.
This should fix it: #89
Works.
EDITED
Ticket: https://jira.appcelerator.org/browse/TIMOB-27124