Skip to content

feat: add app icon to WebDriverAgentRunner#1138

Merged
KazuCocoa merged 2 commits into
appium:masterfrom
harsha509:feat/runner-app-icon
May 21, 2026
Merged

feat: add app icon to WebDriverAgentRunner#1138
KazuCocoa merged 2 commits into
appium:masterfrom
harsha509:feat/runner-app-icon

Conversation

@harsha509

Copy link
Copy Markdown
Member

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:

  • 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.

Test plan

  • Build the WebDriverAgentRunner scheme for an iOS device/simulator and confirm the build succeeds with the new post-action.
  • Install the resulting Runner on an iOS device/simulator and verify the Appium icon appears on the home screen (not blank/white).
  • Re-run an existing WDA test session to confirm no regression in test execution.
  • Verify codesigning of the Runner.app remains valid after the post-action (codesign --verify --deep).

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.
@harsha509

Copy link
Copy Markdown
Member Author
Screenshot 2026-05-18 at 9 10 34 PM

Not sure if this makes sense, but an its an 8 yrs dream to make it done :)

@mykola-mokhnach

Copy link
Copy Markdown

Does the script also work for simulators?

@harsha509

Copy link
Copy Markdown
Member Author

Does the script also work for simulators?

Yes @mykola-mokhnach

image

@KazuCocoa

Copy link
Copy Markdown
Member

Will you run the test plan, or have you done all of them?

@harsha509

Copy link
Copy Markdown
Member Author

Will you run the test plan, or have you done all of them?

Hi @KazuCocoa,
Tested and updated

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.
@harsha509 harsha509 force-pushed the feat/runner-app-icon branch from 3cfdd07 to ae48f7c Compare May 21, 2026 02:15
@KazuCocoa KazuCocoa merged commit fe8adc8 into appium:master May 21, 2026
42 checks passed
github-actions Bot pushed a commit that referenced this pull request May 21, 2026
## [13.1.0](v13.0.0...v13.1.0) (2026-05-21)

### Features

* add app icon to WebDriverAgentRunner ([#1138](#1138)) ([fe8adc8](fe8adc8))
* Add helper method to fetch build settings ([#1139](#1139)) ([56b5f38](56b5f38))
@github-actions

Copy link
Copy Markdown

🎉 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.
github-actions Bot pushed a commit that referenced this pull request May 22, 2026
## [13.1.1](v13.1.0...v13.1.1) (2026-05-22)

### Bug Fixes

* ship Scripts/embed-runner-icon.sh in the npm package ([#1141](#1141)) ([17ac1c1](17ac1c1)), closes [#1138](#1138)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants