From 5ac32fc0977190a464c62c63cad5fcb04067c34e Mon Sep 17 00:00:00 2001 From: Ken Luke Date: Fri, 23 Apr 2021 11:33:14 -0700 Subject: [PATCH] `instruments` is depreacted, update to use `xcrun xctrace` The instruments command is deprecated as of Xcode 12 (https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes). Updated to use the corresponding `xcrun` command. --- ci/ios.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/ios.yml b/ci/ios.yml index 64b14a3..74c974d 100644 --- a/ci/ios.yml +++ b/ci/ios.yml @@ -25,7 +25,8 @@ jobs: scheme: ${{ 'default' }} platform: ${{ 'iOS Simulator' }} run: | - device=`instruments -s -devices | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'` + # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) + device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`` if [ $scheme = default ]; then scheme=$(cat default); fi if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` @@ -35,7 +36,8 @@ jobs: scheme: ${{ 'default' }} platform: ${{ 'iOS Simulator' }} run: | - device=`instruments -s -devices | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'` + # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) + device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`` if [ $scheme = default ]; then scheme=$(cat default); fi if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`