You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/10/12 16:54:55 UTC

[GitHub] [cordova-paramedic] airdrummingfool opened a new pull request #226: Fix #225: `instruments` removed in Xcode 13

airdrummingfool opened a new pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226


   The `instruments` command has been deprecated in Xcode 12 and removed in Xcode 13, which causes the `getSimulatorCollection()` function to fail to list the simulators. The `instruments` command in Xcode 12 includes a deprecation warning that says to use `xcrun xctrace` instead.
   
   For more info, see #225.
   
   <!--
   Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   iOS
   
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   Fixes #225
   
   
   ### Description
   <!-- Describe your changes in detail -->
   Use `xcrun xctrace list devices` instead of the deprecated `instruments -s devices` to list simulator devices.
   
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   I tested on my macOS 11.6 machine that has Xcode 13 installed.
   
   
   ### Checklist
   
   - [ ] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [ ] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [x] I've updated the documentation if necessary
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] erisu commented on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
erisu commented on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-941903575


   I have not tested these changes but are you 100% positive that they are working correctly from your testing?
   
   Looking at the code from this link shows that the returned result is parsed by regular expressions to grab the simulator IDs.
   https://github.com/apache/cordova-paramedic/blob/master/lib/utils/utilities.js#L134
   
   As you pointed out in your ticket description:
   > it looks like xcrun xctrace list devices is a good replacement, though the output does not line up exactly.
   
   If the regular expression is not updated, I do not see how your testing of this PR works cause the regular expression is looking for the old pattern.
   
   Can you please confirm this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] erisu merged pull request #226: feat(ios): add Xcode 13 & iOS 15 support

Posted by GitBox <gi...@apache.org>.
erisu merged pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] erisu edited a comment on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
erisu edited a comment on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-943452463


   For some additional notes, I have been trying to figure out why the iOS tests are failing in paramedic. It seems that GitHub has finally added iOS 15 to their image and all of our tests are running against iOS 15.
   
   So I am trying to figure out what we can do to make it run against the correct versions.
   
   Here are the changes I have been messing around with, within my repo. These changes also includes your changes.
   https://github.com/erisu/cordova-paramedic/pull/14/files


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] erisu commented on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
erisu commented on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-941903575


   I have not tested these changes but are you 100% positive that they are working correctly from your testing?
   
   Looking at the code from this link shows that the returned result is parsed by regular expressions to grab the simulator IDs.
   https://github.com/apache/cordova-paramedic/blob/master/lib/utils/utilities.js#L134
   
   As you pointed out in your ticket description:
   > it looks like xcrun xctrace list devices is a good replacement, though the output does not line up exactly.
   
   If the regular expression is not updated, I do not see how your testing of this PR works cause the regular expression is looking for the old pattern.
   
   Can you please confirm this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] erisu commented on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
erisu commented on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-943099628


   ### Previous Regular Expression w/ `instruments`
   
   **Use Case 1: iPhone:**
   
   Previous RegEx: `/^([a-zA-Z\d ]+) \(([\d.]+)\) \[([a-zA-Z\d-]*)\].*$/`
   Sample Data: `iPhone 12 (14.5) [0AFC41A6-E65C-484A-89C8-EC756B330821] (Simulator)`
   
   Example Match:
   
   <img width="699" alt="use-case-1" src="https://user-images.githubusercontent.com/1029107/137271409-2982f196-295f-4cd2-b697-a9fb980a8c17.png">
   
   **Use Case 2: iPhone + Apple Watch:**
   
   We do not handle this use case since the previous regular expression does not match with the sample data:
   `iPhone 12 (14.5) + Apple Watch Series 5 - 44mm (7.4) [DC773D49-C704-4BA2-A3C1-A6FCAA68B047] (Simulator)`
   
   This is to remain excluded from this PR.
   
   <hr />
   
   ### New Regular Expression w/ `xcrun xctrace list `
   
   **Use Case 1: iPhone:**
   
   New RegEx: `/^([a-zA-Z\d ]+) Simulator \(([\d.]+)\) \(([a-zA-Z\d-]*)\).*$/`
   Sample Data: `iPhone 12 Pro Simulator (15.0) (14B3DA19-0752-4484-B393-AC95EF2D46F8)`
   
   In the above example RegEx, it might be better to add `Simulator` to the expression.
   
   Example Match:
   
   <img width="706" alt="use-case-1-new" src="https://user-images.githubusercontent.com/1029107/137272239-a87bfd97-669e-44a0-99dd-c8bc278db061.png"> 
   
   **Use Case 2: iPhone + Apple Watch:**
   
   This is to remain excluded from this PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] erisu commented on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
erisu commented on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-943452463


   For some additional notes, I have been trying to figure out why the iOS tests are failing in paramedic. It seems that GitHub has finally added iOS 15 to their image and all of our tests are running against iOS 15.
   
   So I am trying to figure out what we can do to make it run against the correct versions.
   
   Here are the changes I have been messing around with my repo, which also includes your changes.
   https://github.com/erisu/cordova-paramedic/pull/14/files


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] airdrummingfool commented on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
airdrummingfool commented on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-943441032


   @erisu that was the other option I considered. I have no objections to doing it that way - I will update the PR accordingly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] airdrummingfool commented on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
airdrummingfool commented on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-944424363






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] erisu edited a comment on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
erisu edited a comment on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-944421498






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] airdrummingfool commented on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
airdrummingfool commented on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-942584616


   @erisu Thanks for pointing this out. I didn't look at the regex because in my testing, the original change in this PR was enough to bypass the crash and complete the tests. However, looking into it more, you're right - the regex will not generate any matches as-is, and should be adjusted.
   
   I've changed the code a bit to account for the difference, and the regex now correctly finds matches. The only thing I can find that this materially affects is that `cordova-paramedic` couldn't uninstall the app from the simulator without the new changes (which didn't stop the tests from proceeding, which is why I didn't notice it in my original testing).
   
   One small note: I wasn't sure how best to handle ` Simulator` being a part of the new output. It could be integrated into the regex, but it seemed like that would make it more brittle (and possibly cause issues across languages?) so I added separate code to remove ` Simulator` from the line before the regex is run. It's still not language-independent, but at least it can be changed easily if it becomes necessary.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] airdrummingfool commented on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
airdrummingfool commented on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-942584616


   @erisu Thanks for pointing this out. I didn't look at the regex because in my testing, the original change in this PR was enough to bypass the crash and complete the tests. However, looking into it more, you're right - the regex will not generate any matches as-is, and should be adjusted.
   
   I've changed the code a bit to account for the difference, and the regex now correctly finds matches. The only thing I can find that this materially affects is that `cordova-paramedic` couldn't uninstall the app from the simulator without the new changes (which didn't stop the tests from proceeding, which is why I didn't notice it in my original testing).
   
   One small note: I wasn't sure how best to handle ` Simulator` being a part of the new output. It could be integrated into the regex, but it seemed like that would make it more brittle (and possibly cause issues across languages?) so I added separate code to remove ` Simulator` from the line before the regex is run. It's still not language-independent, but at least it can be changed easily if it becomes necessary.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] erisu commented on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
erisu commented on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-943100012


   From the above comment, what do you think about adding `Simulator` to the expression?
   
   `/^([a-zA-Z\d ]+) Simulator \(([\d.]+)\) \(([a-zA-Z\d-]*)\).*$/`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-paramedic] erisu commented on pull request #226: Fix #225: `instruments` removed in Xcode 13

Posted by GitBox <gi...@apache.org>.
erisu commented on pull request #226:
URL: https://github.com/apache/cordova-paramedic/pull/226#issuecomment-944421498






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org