appium-webdriveragent 13.1.0 → 13.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [13.1.1](https://github.com/appium/WebDriverAgent/compare/v13.1.0...v13.1.1) (2026-05-22)
2
+
3
+ ### Bug Fixes
4
+
5
+ * ship Scripts/embed-runner-icon.sh in the npm package ([#1141](https://github.com/appium/WebDriverAgent/issues/1141)) ([17ac1c1](https://github.com/appium/WebDriverAgent/commit/17ac1c16a0890ee0fbfe73504a3ff570dfe1a7bf)), closes [#1138](https://github.com/appium/WebDriverAgent/issues/1138)
6
+
1
7
  ## [13.1.0](https://github.com/appium/WebDriverAgent/compare/v13.0.0...v13.1.0) (2026-05-21)
2
8
 
3
9
  ### Features
@@ -0,0 +1,87 @@
1
+ #!/bin/bash
2
+ # Embed the WDA app icon into the wrapping XCTRunner host app so the
3
+ # installed WebDriverAgent shows the Appium logo on the iOS home screen
4
+ # instead of a blank icon.
5
+ #
6
+ # Apple's USES_XCTRUNNER auto-generates a Runner.app around UI-testing
7
+ # .xctest bundles but does not inherit icons from the test bundle's
8
+ # asset catalog. actool produces AppIcon*.png + Assets.car inside
9
+ # PlugIns/<product>.xctest/ where iOS never looks. This script lifts
10
+ # them up to the Runner.app root and patches Info.plist accordingly.
11
+ #
12
+ # Limitations:
13
+ # - Touches XCTRunner internals; may need updates across Xcode versions.
14
+ # - iOS only; tvOS uses different "Brand Assets" and is not handled.
15
+ # - Cloud device farms that re-sign WDA must preserve these changes.
16
+
17
+ set -euo pipefail
18
+
19
+ RUNNER_APP="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}-Runner.app"
20
+ XCTEST="${RUNNER_APP}/PlugIns/${PRODUCT_NAME}.xctest"
21
+
22
+ if [ ! -d "$RUNNER_APP" ]; then
23
+ echo "warning: ${PRODUCT_NAME}-Runner.app not found at $RUNNER_APP; skipping icon embed"
24
+ exit 0
25
+ fi
26
+
27
+ if [ ! -d "$XCTEST" ]; then
28
+ echo "warning: ${PRODUCT_NAME}.xctest not found inside Runner.app; skipping icon embed"
29
+ exit 0
30
+ fi
31
+
32
+ shopt -s nullglob
33
+ ICONS=("$XCTEST"/AppIcon*.png)
34
+ if [ ${#ICONS[@]} -eq 0 ]; then
35
+ echo "warning: no compiled AppIcon*.png found inside $XCTEST; skipping icon embed"
36
+ exit 0
37
+ fi
38
+
39
+ cp -f "${ICONS[@]}" "$RUNNER_APP/"
40
+ if [ -f "$XCTEST/Assets.car" ]; then
41
+ cp -f "$XCTEST/Assets.car" "$RUNNER_APP/"
42
+ fi
43
+
44
+ PLIST="$RUNNER_APP/Info.plist"
45
+ /usr/libexec/PlistBuddy -c "Delete :CFBundleIcons" "$PLIST" 2>/dev/null || true
46
+ /usr/libexec/PlistBuddy -c "Delete :CFBundleIcons~ipad" "$PLIST" 2>/dev/null || true
47
+
48
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons dict" "$PLIST"
49
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons:CFBundlePrimaryIcon dict" "$PLIST"
50
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons:CFBundlePrimaryIcon:CFBundleIconName string AppIcon" "$PLIST"
51
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons:CFBundlePrimaryIcon:CFBundleIconFiles array" "$PLIST"
52
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons:CFBundlePrimaryIcon:CFBundleIconFiles:0 string AppIcon60x60" "$PLIST"
53
+
54
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons~ipad dict" "$PLIST"
55
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons~ipad:CFBundlePrimaryIcon dict" "$PLIST"
56
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons~ipad:CFBundlePrimaryIcon:CFBundleIconName string AppIcon" "$PLIST"
57
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons~ipad:CFBundlePrimaryIcon:CFBundleIconFiles array" "$PLIST"
58
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons~ipad:CFBundlePrimaryIcon:CFBundleIconFiles:0 string AppIcon60x60" "$PLIST"
59
+ /usr/libexec/PlistBuddy -c "Add :CFBundleIcons~ipad:CFBundlePrimaryIcon:CFBundleIconFiles:1 string AppIcon76x76" "$PLIST"
60
+
61
+ # Re-codesign since we modified the bundle after Xcode signed it.
62
+ # In a scheme post-action context Xcode's CODE_SIGN_* env vars are not exposed,
63
+ # so discover the existing signing identity from the already-signed bundle.
64
+ if [ -d "$RUNNER_APP/_CodeSignature" ]; then
65
+ # Capture the signature info once. Piping codesign straight into
66
+ # `awk ... exit` makes awk close the pipe early, killing codesign with
67
+ # SIGPIPE -- which `set -o pipefail` turns into a fatal error. That trips
68
+ # only when an Authority line exists, i.e. on every real-device build.
69
+ SIGN_INFO=$(codesign -dvv "$RUNNER_APP" 2>&1 || true)
70
+ EXISTING_IDENT="${EXPANDED_CODE_SIGN_IDENTITY:-}"
71
+ if [ -z "$EXISTING_IDENT" ]; then
72
+ EXISTING_IDENT=$(awk -F'=' '/^Authority/ {print $2; exit}' <<< "$SIGN_INFO")
73
+ fi
74
+ # Simulator builds are ad-hoc signed: there is no Authority line, but the
75
+ # bundle can still be re-signed ad-hoc with an identity of "-".
76
+ if [ -z "$EXISTING_IDENT" ] && grep -q '^Signature=adhoc' <<< "$SIGN_INFO"; then
77
+ EXISTING_IDENT="-"
78
+ fi
79
+ if [ -n "$EXISTING_IDENT" ]; then
80
+ codesign --force --sign "$EXISTING_IDENT" \
81
+ --preserve-metadata=identifier,entitlements "$RUNNER_APP"
82
+ else
83
+ echo "warning: bundle is signed but no identity discovered; signature will be invalid"
84
+ fi
85
+ fi
86
+
87
+ echo "embedded icon into $RUNNER_APP"
@@ -15,11 +15,11 @@
15
15
  <key>CFBundlePackageType</key>
16
16
  <string>FMWK</string>
17
17
  <key>CFBundleShortVersionString</key>
18
- <string>13.1.0</string>
18
+ <string>13.1.1</string>
19
19
  <key>CFBundleSignature</key>
20
20
  <string>????</string>
21
21
  <key>CFBundleVersion</key>
22
- <string>13.1.0</string>
22
+ <string>13.1.1</string>
23
23
  <key>NSPrincipalClass</key>
24
24
  <string/>
25
25
  </dict>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "13.1.0",
3
+ "version": "13.1.1",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "main": "./build/lib/index.js",
6
6
  "types": "./build/lib/index.d.ts",
@@ -88,6 +88,7 @@
88
88
  "lib",
89
89
  "build/lib",
90
90
  "Scripts/build.sh",
91
+ "Scripts/embed-runner-icon.sh",
91
92
  "Scripts/*.mjs",
92
93
  "Configurations",
93
94
  "PrivateHeaders",