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

feat: support Xcode 11 #88

Merged
merged 5 commits into from
Jun 5, 2019
Merged

feat: support Xcode 11 #88

merged 5 commits into from
Jun 5, 2019

Conversation

hansemannn
Copy link
Contributor

@hansemannn hansemannn commented Jun 3, 2019

@cb1kenobi cb1kenobi self-assigned this Jun 4, 2019
@cb1kenobi
Copy link
Contributor

CR'd and code looks good. I'll test it as soon as I can.

@hansemannn
Copy link
Contributor Author

I'll add the mappings later today as well. Downloading all those sim images is a pain.

@cb1kenobi
Copy link
Contributor

OK, I'll hold off on merging until you say the mappings are updated. Thanks!

@vijaysingh-axway
Copy link

vijaysingh-axway commented Jun 4, 2019

I tried to adding changes in my sdk code base and its working fine on simulator.

@hansemannn
Copy link
Contributor Author

@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.

lib/xcode.js Outdated Show resolved Hide resolved
lib/xcode.js Outdated Show resolved Hide resolved
lib/simctl.js Outdated Show resolved Hide resolved
@hansemannn
Copy link
Contributor Author

@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)')) {
Copy link
Contributor

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)')) {

Copy link
Contributor Author

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.

@cb1kenobi
Copy link
Contributor

APPROVED!!!

@cb1kenobi cb1kenobi merged commit bd74cea into tidev:1_7_X Jun 5, 2019
@hansemannn hansemannn deleted the xcode-11-1_7_X branch June 5, 2019 15:53
@hansemannn
Copy link
Contributor Author

Should I do the timob one as well?

@cb1kenobi
Copy link
Contributor

@hansemannn go for it! :)

@cb1kenobi
Copy link
Contributor

Please add the link to the timob PR to the ticket.

@hansemannn
Copy link
Contributor Author

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)') {
Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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:

  1. Run an app with Xcode 10 (ti build -p ios)
  2. 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.

Copy link
Contributor

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

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.

None yet

3 participants