Skip to content

Commit

Permalink
Warn about broken exit code detection in iOS 15+ (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
premun authored Mar 3, 2022
1 parent bfd2a00 commit f1de706
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ Task<ExitCode> ExecuteMacCatalystApp(AppBundleInformation appBundleInfo)

Task<ExitCode> ExecuteApp(AppBundleInformation appBundleInfo, IDevice device, IDevice? companionDevice)
{
// Exit code detection is broken on the newest iOS
// More details here: https://github.com/dotnet/xharness/issues/819
if (expectedExitCode != 0)
{
var os = target.Platform.IsSimulator() ? device.OSVersion.Split(' ', 2).Last() : device.OSVersion;
if (Version.TryParse(os, out var version) && version.Major > 14)
{
_logger.LogWarning(
"Exit code detection is not working on iOS/tvOS 15+ so the run will fail to match it with the expected value");
}
}

appRunStarted = true;
return this.ExecuteApp(
appBundleInfo,
Expand Down

0 comments on commit f1de706

Please sign in to comment.