[msbuild] Fix finding applicable simulator devices in GetMlaunchArguments task.#24610
[msbuild] Fix finding applicable simulator devices in GetMlaunchArguments task.#24610rolfbjarne merged 4 commits intomainfrom
Conversation
…ents task. When we're dealing with an app that runs on both iPhone and iPad, we need to list both iPhone and iPad simulators, not just iPad simulators. This fixes an issue where we'd fail to find a simulator when specified by a udid if: * The app targets both iPhone and iPad. * The desired simulator is an iPhone. The symptom would be this error, after 'dotnet run': > error MT1207: Could not find the simulator device type 'iPhone 4s'.
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the GetMlaunchArguments MSBuild task where it failed to find iPhone simulators when the app targets both iPhone and iPad devices. The issue occurred because the code only looked for iPad simulators when IPhoneAndIPad was specified, excluding valid iPhone simulators from the search.
Changes:
- Changed
productFamilyfrom a single string toproductFamiliesarray to support multiple device families - Updated the
IPhoneAndIPadcase to include both "iPhone" and "iPad" product families instead of just "iPad" - Modified the XPath query to use an OR condition across all applicable product families
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #4ad1d10] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #4ad1d10] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #4ad1d10] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #4ad1d10] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #4ad1d10] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #4ad1d10] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #4ad1d10] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
💻 [CI Build #4ad1d10] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #4ad1d10] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 117 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
…r devices in GetMlaunchArguments task. (#24611) When we're dealing with an app that runs on both iPhone and iPad, we need to list both iPhone and iPad simulators, not just iPad simulators. This fixes an issue where we'd fail to find a simulator when specified by a udid if: * The app targets both iPhone and iPad. * The desired simulator is an iPhone. The symptom would be this error, after 'dotnet run': > error MT1207: Could not find the simulator device type 'iPhone 4s'. Backport of #24610.
When we're dealing with an app that runs on both iPhone and iPad, we need to
list both iPhone and iPad simulators, not just iPad simulators.
This fixes an issue where we'd fail to find a simulator when specified by a udid if:
The symptom would be this error, after 'dotnet run':