Skip to content

Commit 1df2545

Browse files
authored
transform XCTRunner.app Info.plist to xml before sed'ing it (#2763)
Handle the new case in Xcode 26 where the Info.plist in the XCTRunner.app is a binary plist, rather than an XML plist in Xcode 16. Coercing the plist to xml works whether or not it is originally a plist, and Xcode 16 handles the case of a binary plist adequately. Also willing to rework this to do keypath-based substitution instead of using sed, though the sed approach has definitely proven resilient up to now.
1 parent feeb7db commit 1df2545

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apple/testing/default_runner/ios_xctestrun_runner.template.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,16 @@ if [[ -n "$test_host_path" ]]; then
216216
fi
217217
xcrun_test_bundle_path="__TESTHOST__/PlugIns/$test_bundle_name.xctest"
218218

219+
runner_app_infoplist="$runner_app_destination/Info.plist"
220+
/usr/bin/plutil -convert xml1 "$runner_app_infoplist"
219221
/usr/bin/sed \
220222
-e "s@\$(WRAPPEDPRODUCTNAME)@XCTRunner@g"\
221223
-e "s@WRAPPEDPRODUCTNAME@XCTRunner@g"\
222224
-e "s@\$(WRAPPEDPRODUCTBUNDLEIDENTIFIER)@$xcrun_test_host_bundle_identifier@g"\
223225
-e "s@WRAPPEDPRODUCTBUNDLEIDENTIFIER@$xcrun_test_host_bundle_identifier@g"\
224226
-i "" \
225-
"$runner_app_destination/Info.plist"
227+
"$runner_app_infoplist"
228+
/usr/bin/plutil -convert binary1 "$runner_app_infoplist"
226229

227230
readonly runner_app_frameworks_destination="$runner_app_destination/Frameworks"
228231
mkdir -p "$runner_app_frameworks_destination"

0 commit comments

Comments
 (0)