feat: add app icon to WebDriverAgentRunner#1138
Merged
Merged
Conversation
Previously the WDA Runner installed as a blank/white icon on iOS home
screens because Xcode's auto-generated XCTRunner host app does not
inherit icons from the test bundle's asset catalog.
This change:
- Adds an Appium-logo AppIcon asset catalog to WebDriverAgentRunner
so actool compiles iOS icon variants into the .xctest bundle.
- Adds Scripts/embed-runner-icon.sh, a scheme post-action that lifts
the compiled icons from PlugIns/<name>.xctest/ into the Runner.app
root, patches the Runner.app Info.plist with CFBundleIcons /
CFBundleIcons~ipad, and re-codesigns the bundle.
- Wires the script in via a <PostActions> entry on the scheme's
BuildAction so it runs after Xcode's CopyPlistFile step (a Run
Script build phase fires too early and gets overwritten).
iOS only; tvOS uses a different layered Brand Assets format and is
intentionally not handled here.
Member
Author
|
Does the script also work for simulators? |
Member
Author
Yes @mykola-mokhnach
|
Member
|
Will you run the test plan, or have you done all of them? |
mykola-mokhnach
approved these changes
May 20, 2026
Member
Author
Hi @KazuCocoa, |
The icon-embed post-action re-codesigns the Runner.app after modifying
it. Two bugs in the identity-discovery step were caught running the PR
test plan on a real device:
- Piping `codesign -dvv` straight into `awk '... exit'` makes awk close
the pipe early, killing codesign with SIGPIPE. With `set -o pipefail`
that became a fatal error and failed the whole build. It triggered
whenever an Authority line exists -- i.e. every real-device build.
Simulator builds dodged it only because their ad-hoc signature has no
Authority line. Fix: capture codesign output once into a variable and
parse from the string, so no live pipe can be broken.
- Simulator builds are ad-hoc signed (no Authority line), so no identity
was discovered and the bundle was left with a stale signature that
failed `codesign --verify`. Fix: fall back to an ad-hoc identity ("-")
when the bundle reports `Signature=adhoc`.
Verified on iOS simulator and a real device: build succeeds, post-action
runs, and `codesign --verify --deep --strict` reports the Runner.app as
valid.
3cfdd07 to
ae48f7c
Compare
KazuCocoa
approved these changes
May 21, 2026
|
🎉 This PR is included in version 13.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
mykola-mokhnach
pushed a commit
that referenced
this pull request
May 22, 2026
#1138 added Scripts/embed-runner-icon.sh and wired it as a WebDriverAgentRunner build post-action, but the package.json `files` allowlist only ships `Scripts/build.sh` and `Scripts/*.mjs`. The new script matches neither pattern, so it is excluded from the published npm tarball. As a result, builds from the published appium-webdriveragent package run the scheme post-action against a missing script: the Appium app icon is never embedded into Runner.app, and WebDriverAgentRunner installs on the home screen with a blank/white icon. Add an explicit `Scripts/embed-runner-icon.sh` entry to `files` so the script ships in the package.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Previously the WDA Runner installed as a blank/white icon on iOS home screens because Xcode's auto-generated XCTRunner host app does not inherit icons from the test bundle's asset catalog.
This change:
AppIconasset catalog toWebDriverAgentRunnersoactoolcompiles iOS icon variants into the.xctestbundle.Scripts/embed-runner-icon.sh, a scheme post-action that lifts the compiled icons fromPlugIns/<name>.xctest/into theRunner.approot, patches theRunner.appInfo.plistwithCFBundleIcons/CFBundleIcons~ipad, and re-codesigns the bundle.<PostActions>entry on the scheme'sBuildActionso it runs after Xcode'sCopyPlistFilestep (a Run Script build phase fires too early and gets overwritten).iOS only; tvOS uses a different layered Brand Assets format and is intentionally not handled here.
Test plan
WebDriverAgentRunnerscheme for an iOS device/simulator and confirm the build succeeds with the new post-action.codesign --verify --deep).