From a28607c3b636c838c303480e3de7741eb66b8619 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Fri, 30 Jan 2026 20:24:29 +0200 Subject: [PATCH 01/10] Add Java API stubs for missing reflection types --- vm/JavaAPI/src/java/io/Externalizable.java | 34 +++++++++++++++++++ vm/JavaAPI/src/java/io/ObjectInput.java | 31 +++++++++++++++++ vm/JavaAPI/src/java/io/ObjectOutput.java | 31 +++++++++++++++++ .../java/lang/reflect/GenericArrayType.java | 13 +++++++ .../java/lang/reflect/ParameterizedType.java | 17 ++++++++++ .../src/java/lang/reflect/TypeVariable.java | 17 ++++++++++ .../src/java/lang/reflect/WildcardType.java | 15 ++++++++ 7 files changed, 158 insertions(+) create mode 100644 vm/JavaAPI/src/java/io/Externalizable.java create mode 100644 vm/JavaAPI/src/java/io/ObjectInput.java create mode 100644 vm/JavaAPI/src/java/io/ObjectOutput.java create mode 100644 vm/JavaAPI/src/java/lang/reflect/GenericArrayType.java create mode 100644 vm/JavaAPI/src/java/lang/reflect/ParameterizedType.java create mode 100644 vm/JavaAPI/src/java/lang/reflect/TypeVariable.java create mode 100644 vm/JavaAPI/src/java/lang/reflect/WildcardType.java diff --git a/vm/JavaAPI/src/java/io/Externalizable.java b/vm/JavaAPI/src/java/io/Externalizable.java new file mode 100644 index 0000000000..6aa211e977 --- /dev/null +++ b/vm/JavaAPI/src/java/io/Externalizable.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2012, Codename One and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Codename One designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Codename One through http://www.codenameone.com/ if you + * need additional information or have any questions. + */ + +package java.io; + +/** + * Here to simplify porting, won't actually work... + * + */ +public interface Externalizable extends Serializable { + void readExternal(ObjectInput in) throws IOException, ClassNotFoundException; + + void writeExternal(ObjectOutput out) throws IOException; +} diff --git a/vm/JavaAPI/src/java/io/ObjectInput.java b/vm/JavaAPI/src/java/io/ObjectInput.java new file mode 100644 index 0000000000..57c0220bdc --- /dev/null +++ b/vm/JavaAPI/src/java/io/ObjectInput.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2012, Codename One and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Codename One designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Codename One through http://www.codenameone.com/ if you + * need additional information or have any questions. + */ + +package java.io; + +/** + * Here to simplify porting, won't actually work... + * + */ +public interface ObjectInput extends DataInput, AutoCloseable { +} diff --git a/vm/JavaAPI/src/java/io/ObjectOutput.java b/vm/JavaAPI/src/java/io/ObjectOutput.java new file mode 100644 index 0000000000..678521603d --- /dev/null +++ b/vm/JavaAPI/src/java/io/ObjectOutput.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2012, Codename One and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Codename One designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Codename One through http://www.codenameone.com/ if you + * need additional information or have any questions. + */ + +package java.io; + +/** + * Here to simplify porting, won't actually work... + * + */ +public interface ObjectOutput extends DataOutput, AutoCloseable { +} diff --git a/vm/JavaAPI/src/java/lang/reflect/GenericArrayType.java b/vm/JavaAPI/src/java/lang/reflect/GenericArrayType.java new file mode 100644 index 0000000000..07451137e4 --- /dev/null +++ b/vm/JavaAPI/src/java/lang/reflect/GenericArrayType.java @@ -0,0 +1,13 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package java.lang.reflect; + +/** + * + */ +public interface GenericArrayType extends Type { + Type getGenericComponentType(); +} diff --git a/vm/JavaAPI/src/java/lang/reflect/ParameterizedType.java b/vm/JavaAPI/src/java/lang/reflect/ParameterizedType.java new file mode 100644 index 0000000000..bc24248282 --- /dev/null +++ b/vm/JavaAPI/src/java/lang/reflect/ParameterizedType.java @@ -0,0 +1,17 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package java.lang.reflect; + +/** + * + */ +public interface ParameterizedType extends Type { + Type[] getActualTypeArguments(); + + Type getRawType(); + + Type getOwnerType(); +} diff --git a/vm/JavaAPI/src/java/lang/reflect/TypeVariable.java b/vm/JavaAPI/src/java/lang/reflect/TypeVariable.java new file mode 100644 index 0000000000..18843790ef --- /dev/null +++ b/vm/JavaAPI/src/java/lang/reflect/TypeVariable.java @@ -0,0 +1,17 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package java.lang.reflect; + +/** + * + */ +public interface TypeVariable extends Type { + Type[] getBounds(); + + D getGenericDeclaration(); + + String getName(); +} diff --git a/vm/JavaAPI/src/java/lang/reflect/WildcardType.java b/vm/JavaAPI/src/java/lang/reflect/WildcardType.java new file mode 100644 index 0000000000..80ed5ad6fb --- /dev/null +++ b/vm/JavaAPI/src/java/lang/reflect/WildcardType.java @@ -0,0 +1,15 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package java.lang.reflect; + +/** + * + */ +public interface WildcardType extends Type { + Type[] getUpperBounds(); + + Type[] getLowerBounds(); +} From 85d20a299cc4f7368e260583bee2665f8ef91c28 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Fri, 30 Jan 2026 20:59:06 +0200 Subject: [PATCH 02/10] Select simulator runtime based on installed Xcode SDK --- scripts/run-ios-ui-tests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/run-ios-ui-tests.sh b/scripts/run-ios-ui-tests.sh index 4b826b4a88..f92099c0c3 100755 --- a/scripts/run-ios-ui-tests.sh +++ b/scripts/run-ios-ui-tests.sh @@ -119,7 +119,12 @@ else ri_log "Scheme file not found for env injection: $SCHEME_FILE" fi -MAX_SIM_OS_MAJOR=20 +SIM_SDK_VERSION="$(xcodebuild -showsdks 2>/dev/null | awk '/iphonesimulator/ {print $NF}' | tail -n 1 | sed 's/iphonesimulator//')" +SIM_SDK_MAJOR="${SIM_SDK_VERSION%%.*}" +case "$SIM_SDK_MAJOR" in + ''|*[!0-9]*) SIM_SDK_MAJOR=20 ;; +esac +MAX_SIM_OS_MAJOR="$SIM_SDK_MAJOR" trim_whitespace() { local value="$1" From a974931bbb24eafbb72496c0e3aff94d12cb8dd0 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Fri, 30 Jan 2026 21:29:54 +0200 Subject: [PATCH 03/10] Select available iOS simulator destinations --- scripts/run-ios-ui-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/run-ios-ui-tests.sh b/scripts/run-ios-ui-tests.sh index f92099c0c3..93f64bf551 100755 --- a/scripts/run-ios-ui-tests.sh +++ b/scripts/run-ios-ui-tests.sh @@ -309,7 +309,7 @@ fallback_sim_destination() { [ -n "$current_version" ] && best_line="$best_line,OS=$current_version" best_line="$best_line,name=$name" fi - done < <(xcrun simctl list devices 2>/dev/null) + done < <(xcrun simctl list devices available 2>/dev/null) if [ -n "$best_line" ]; then printf '%s\n' "$best_line" @@ -441,7 +441,7 @@ APP_PROCESS_NAME="${WRAPPER_NAME%.app}" resolved_id="$(trim_whitespace "$id_part")" break fi - done < <(xcrun simctl list devices 2>/dev/null) + done < <(xcrun simctl list devices available 2>/dev/null) SIM_DEVICE_ID="$resolved_id" fi fi From 6a1d93ed6dc7f50c3202fe82d333151ec93af5d2 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Sat, 31 Jan 2026 10:03:50 +0200 Subject: [PATCH 04/10] Resolve xcodebuild path for iOS builds --- .../com/codename1/builders/IPhoneBuilder.java | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/IPhoneBuilder.java b/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/IPhoneBuilder.java index 10794d10f7..31aac1eb3e 100644 --- a/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/IPhoneBuilder.java +++ b/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/IPhoneBuilder.java @@ -283,7 +283,7 @@ public boolean build(File sourceZip, BuildRequest request) throws BuildException disableUIWebView = enableWKWebView && "true".equals(request.getArg("ios.noUIWebView", "true")); boolean bicodeHandle = true; - xcodebuild = "xcodebuild"; + xcodebuild = resolveXcodebuild(); xcodeVersion = getXcodeVersion(xcodebuild); if (xcodeVersion <= 0) { xcodeVersion = 10; @@ -2593,6 +2593,51 @@ private int getMajorVersionInt(String versionStr, int defaultVal) { } return defaultVal; } + + private String resolveXcodebuild() { + String developerDir = System.getenv("DEVELOPER_DIR"); + if (developerDir != null && developerDir.length() > 0) { + File candidate = new File(developerDir, "usr/bin/xcodebuild"); + if (candidate.exists()) { + log("Using xcodebuild from DEVELOPER_DIR: " + candidate.getAbsolutePath()); + return candidate.getAbsolutePath(); + } + } + + String xcodeApp = System.getenv("XCODE_APP"); + if (xcodeApp != null && xcodeApp.length() > 0) { + File candidate = new File(xcodeApp, "Contents/Developer/usr/bin/xcodebuild"); + if (candidate.exists()) { + log("Using xcodebuild from XCODE_APP: " + candidate.getAbsolutePath()); + return candidate.getAbsolutePath(); + } + } + + File xcrun = new File("/usr/bin/xcrun"); + if (xcrun.exists()) { + try { + String resolved = execString(tmpFile, xcrun.getAbsolutePath(), "-f", "xcodebuild"); + if (resolved != null) { + resolved = resolved.trim(); + } + if (resolved != null && resolved.length() > 0) { + log("Using xcodebuild resolved by xcrun: " + resolved); + return resolved; + } + } catch (Exception ex) { + debug("xcrun failed to resolve xcodebuild: " + ex.getMessage()); + } + } + + File usrBin = new File("/usr/bin/xcodebuild"); + if (usrBin.exists()) { + log("Using xcodebuild at /usr/bin/xcodebuild"); + return usrBin.getAbsolutePath(); + } + + log("Using xcodebuild from PATH"); + return "xcodebuild"; + } From aa51419ba18c774421b9c695493cc5018381b31e Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Sat, 31 Jan 2026 18:55:58 +0200 Subject: [PATCH 05/10] Check for installed iOS simulator runtimes --- scripts/run-ios-ui-tests.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/run-ios-ui-tests.sh b/scripts/run-ios-ui-tests.sh index 93f64bf551..669dcd8dff 100755 --- a/scripts/run-ios-ui-tests.sh +++ b/scripts/run-ios-ui-tests.sh @@ -83,6 +83,20 @@ ARTIFACTS_DIR="${ARTIFACTS_DIR:-${GITHUB_WORKSPACE:-$REPO_ROOT}/artifacts}" mkdir -p "$ARTIFACTS_DIR" TEST_LOG="$ARTIFACTS_DIR/device-runner.log" +SDK_LIST="$(xcodebuild -showsdks 2>/dev/null || true)" +if ! printf '%s\n' "$SDK_LIST" | grep -q "iphonesimulator"; then + ri_log "No iOS simulator SDKs detected in Xcode. Install the iOS platform in Xcode > Settings > Components." >&2 + printf '%s\n' "$SDK_LIST" > "$ARTIFACTS_DIR/xcodebuild-showsdks.log" + exit 3 +fi + +RUNTIME_LIST="$(xcrun simctl list runtimes available 2>/dev/null || true)" +if ! printf '%s\n' "$RUNTIME_LIST" | grep -q "iOS"; then + ri_log "No available iOS simulator runtimes detected. Install an iOS simulator runtime in Xcode > Settings > Components." >&2 + printf '%s\n' "$RUNTIME_LIST" > "$ARTIFACTS_DIR/simctl-runtimes.log" + exit 3 +fi + if [ -z "$REQUESTED_SCHEME" ]; then if [[ "$WORKSPACE_PATH" == *.xcworkspace ]]; then REQUESTED_SCHEME="$(basename "$WORKSPACE_PATH" .xcworkspace)" From 37094c1c781028d1ccabc1f1d819be9326f86981 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Sat, 31 Jan 2026 20:25:43 +0200 Subject: [PATCH 06/10] Fail early when Xcode has no simulator destinations --- scripts/run-ios-ui-tests.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/run-ios-ui-tests.sh b/scripts/run-ios-ui-tests.sh index 669dcd8dff..704e1cfd7b 100755 --- a/scripts/run-ios-ui-tests.sh +++ b/scripts/run-ios-ui-tests.sh @@ -340,6 +340,13 @@ if [ -z "$SIM_DESTINATION" ]; then ri_log "Auto-selected simulator destination '$SIM_DESTINATION'" else ri_log "Simulator auto-selection did not return a destination" + SHOW_DEST_LOG="$ARTIFACTS_DIR/xcodebuild-showdestinations.log" + xcodebuild -workspace "$WORKSPACE_PATH" -scheme "$SCHEME" -sdk iphonesimulator -showdestinations \ + > "$SHOW_DEST_LOG" 2>&1 || true + if grep -q "not installed" "$SHOW_DEST_LOG"; then + ri_log "No eligible simulator destinations reported by xcodebuild. See $SHOW_DEST_LOG" >&2 + exit 3 + fi fi fi if [ -z "$SIM_DESTINATION" ]; then From cb4f1b4d38161304549aad27fa3d9761cb1d8737 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Sat, 31 Jan 2026 20:53:38 +0200 Subject: [PATCH 07/10] Allow optional download of iOS simulator platforms --- scripts/run-ios-ui-tests.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/run-ios-ui-tests.sh b/scripts/run-ios-ui-tests.sh index 704e1cfd7b..d7bb8a6af9 100755 --- a/scripts/run-ios-ui-tests.sh +++ b/scripts/run-ios-ui-tests.sh @@ -84,15 +84,26 @@ mkdir -p "$ARTIFACTS_DIR" TEST_LOG="$ARTIFACTS_DIR/device-runner.log" SDK_LIST="$(xcodebuild -showsdks 2>/dev/null || true)" +RUNTIME_LIST="$(xcrun simctl list runtimes available 2>/dev/null || true)" +DOWNLOAD_PLATFORMS="${XCODE_DOWNLOAD_PLATFORMS:-false}" + +if ! printf '%s\n' "$SDK_LIST" | grep -q "iphonesimulator" || ! printf '%s\n' "$RUNTIME_LIST" | grep -q "iOS"; then + if [ "$DOWNLOAD_PLATFORMS" = "true" ]; then + ri_log "Attempting to download missing iOS platform via xcodebuild -downloadPlatform iOS" + xcodebuild -downloadPlatform iOS || true + SDK_LIST="$(xcodebuild -showsdks 2>/dev/null || true)" + RUNTIME_LIST="$(xcrun simctl list runtimes available 2>/dev/null || true)" + fi +fi + if ! printf '%s\n' "$SDK_LIST" | grep -q "iphonesimulator"; then - ri_log "No iOS simulator SDKs detected in Xcode. Install the iOS platform in Xcode > Settings > Components." >&2 + ri_log "No iOS simulator SDKs detected in Xcode. Install the iOS platform in Xcode > Settings > Components (or set XCODE_DOWNLOAD_PLATFORMS=true)." >&2 printf '%s\n' "$SDK_LIST" > "$ARTIFACTS_DIR/xcodebuild-showsdks.log" exit 3 fi -RUNTIME_LIST="$(xcrun simctl list runtimes available 2>/dev/null || true)" if ! printf '%s\n' "$RUNTIME_LIST" | grep -q "iOS"; then - ri_log "No available iOS simulator runtimes detected. Install an iOS simulator runtime in Xcode > Settings > Components." >&2 + ri_log "No available iOS simulator runtimes detected. Install an iOS simulator runtime in Xcode > Settings > Components (or set XCODE_DOWNLOAD_PLATFORMS=true)." >&2 printf '%s\n' "$RUNTIME_LIST" > "$ARTIFACTS_DIR/simctl-runtimes.log" exit 3 fi From c2495d68f6d869dddeb76de85aea2a2c5ddc0007 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Sat, 31 Jan 2026 21:21:50 +0200 Subject: [PATCH 08/10] Retry simulator destination after platform download --- scripts/run-ios-ui-tests.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/run-ios-ui-tests.sh b/scripts/run-ios-ui-tests.sh index d7bb8a6af9..703400ccd8 100755 --- a/scripts/run-ios-ui-tests.sh +++ b/scripts/run-ios-ui-tests.sh @@ -354,6 +354,14 @@ if [ -z "$SIM_DESTINATION" ]; then SHOW_DEST_LOG="$ARTIFACTS_DIR/xcodebuild-showdestinations.log" xcodebuild -workspace "$WORKSPACE_PATH" -scheme "$SCHEME" -sdk iphonesimulator -showdestinations \ > "$SHOW_DEST_LOG" 2>&1 || true + if grep -q "not installed" "$SHOW_DEST_LOG"; then + if [ "$DOWNLOAD_PLATFORMS" = "true" ]; then + ri_log "Attempting to download missing iOS platform via xcodebuild -downloadPlatform iOS" + xcodebuild -downloadPlatform iOS || true + xcodebuild -workspace "$WORKSPACE_PATH" -scheme "$SCHEME" -sdk iphonesimulator -showdestinations \ + > "$SHOW_DEST_LOG" 2>&1 || true + fi + fi if grep -q "not installed" "$SHOW_DEST_LOG"; then ri_log "No eligible simulator destinations reported by xcodebuild. See $SHOW_DEST_LOG" >&2 exit 3 From f59234b53d9e102a0dd149a1b37a298a82b37b57 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Sun, 1 Feb 2026 04:24:10 +0200 Subject: [PATCH 09/10] Log and hint XCODE_DOWNLOAD_PLATFORMS usage --- scripts/run-ios-ui-tests.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/run-ios-ui-tests.sh b/scripts/run-ios-ui-tests.sh index 703400ccd8..c4780ac13b 100755 --- a/scripts/run-ios-ui-tests.sh +++ b/scripts/run-ios-ui-tests.sh @@ -86,6 +86,7 @@ TEST_LOG="$ARTIFACTS_DIR/device-runner.log" SDK_LIST="$(xcodebuild -showsdks 2>/dev/null || true)" RUNTIME_LIST="$(xcrun simctl list runtimes available 2>/dev/null || true)" DOWNLOAD_PLATFORMS="${XCODE_DOWNLOAD_PLATFORMS:-false}" +ri_log "XCODE_DOWNLOAD_PLATFORMS=${DOWNLOAD_PLATFORMS}" if ! printf '%s\n' "$SDK_LIST" | grep -q "iphonesimulator" || ! printf '%s\n' "$RUNTIME_LIST" | grep -q "iOS"; then if [ "$DOWNLOAD_PLATFORMS" = "true" ]; then @@ -93,6 +94,8 @@ if ! printf '%s\n' "$SDK_LIST" | grep -q "iphonesimulator" || ! printf '%s\n' "$ xcodebuild -downloadPlatform iOS || true SDK_LIST="$(xcodebuild -showsdks 2>/dev/null || true)" RUNTIME_LIST="$(xcrun simctl list runtimes available 2>/dev/null || true)" + else + ri_log "Missing simulator SDKs/runtimes detected. Set XCODE_DOWNLOAD_PLATFORMS=true to attempt auto-download." fi fi @@ -360,6 +363,8 @@ if [ -z "$SIM_DESTINATION" ]; then xcodebuild -downloadPlatform iOS || true xcodebuild -workspace "$WORKSPACE_PATH" -scheme "$SCHEME" -sdk iphonesimulator -showdestinations \ > "$SHOW_DEST_LOG" 2>&1 || true + else + ri_log "Destinations report missing platforms. Set XCODE_DOWNLOAD_PLATFORMS=true to attempt auto-download." fi fi if grep -q "not installed" "$SHOW_DEST_LOG"; then From 99f9e5e7aafa0e13620d2b1b5046749b42863315 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Mon, 2 Feb 2026 04:10:48 +0200 Subject: [PATCH 10/10] Default to auto-download iOS platforms in CI --- scripts/run-ios-ui-tests.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run-ios-ui-tests.sh b/scripts/run-ios-ui-tests.sh index c4780ac13b..f0b9d761e9 100755 --- a/scripts/run-ios-ui-tests.sh +++ b/scripts/run-ios-ui-tests.sh @@ -85,7 +85,11 @@ TEST_LOG="$ARTIFACTS_DIR/device-runner.log" SDK_LIST="$(xcodebuild -showsdks 2>/dev/null || true)" RUNTIME_LIST="$(xcrun simctl list runtimes available 2>/dev/null || true)" -DOWNLOAD_PLATFORMS="${XCODE_DOWNLOAD_PLATFORMS:-false}" +DOWNLOAD_PLATFORMS="${XCODE_DOWNLOAD_PLATFORMS:-}" +if [ -z "$DOWNLOAD_PLATFORMS" ] && [ "${GITHUB_ACTIONS:-false}" = "true" ]; then + DOWNLOAD_PLATFORMS="true" +fi +DOWNLOAD_PLATFORMS="${DOWNLOAD_PLATFORMS:-false}" ri_log "XCODE_DOWNLOAD_PLATFORMS=${DOWNLOAD_PLATFORMS}" if ! printf '%s\n' "$SDK_LIST" | grep -q "iphonesimulator" || ! printf '%s\n' "$RUNTIME_LIST" | grep -q "iOS"; then