From bd1cddf11a975222d702028676d2148acfe62279 Mon Sep 17 00:00:00 2001 From: MateusAndrade Date: Fri, 7 Nov 2025 11:42:24 +0100 Subject: [PATCH 1/2] ci(ios): adding device_id and device_os for build command --- src/commands/ios_build.yml | 19 +++++++++++++++++-- src/jobs/ios_build.yml | 8 ++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/commands/ios_build.yml b/src/commands/ios_build.yml index e185089..939dca7 100644 --- a/src/commands/ios_build.yml +++ b/src/commands/ios_build.yml @@ -18,9 +18,15 @@ parameters: type: string default: "ios/build" device: - description: The type of device you want to build for. + description: The name of device you want to build for. type: string default: "iPhone 11" + device_id: + description: UUID of device you want to build for. + type: string + device_os: + description: OS of device you want to build for, e.g 18.5. + type: string scheme: description: The scheme to use. type: string @@ -40,7 +46,16 @@ steps: - run: name: Build iOS App - command: "export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -<> <> -destination 'platform=iOS Simulator,name=<>' -scheme '<>' -parallelizeTargets -configuration <> -derivedDataPath <> -UseModernBuildSystem=YES | xcpretty -k" + command: | + DESTINATION="platform=iOS Simulator,name=<>" + if [ -n "<>" ]; then + DESTINATION="${DESTINATION},id=<>" + fi + if [ -n "<>" ]; then + DESTINATION="${DESTINATION},OS=<>" + fi + export RCT_NO_LAUNCH_PACKAGER=true + xcodebuild -<> <> -destination "${DESTINATION}" -scheme '<>' -parallelizeTargets -configuration <> -derivedDataPath <> -UseModernBuildSystem=YES | xcpretty -k - when: condition: <> diff --git a/src/jobs/ios_build.yml b/src/jobs/ios_build.yml index 0f277b1..b8eca9d 100644 --- a/src/jobs/ios_build.yml +++ b/src/jobs/ios_build.yml @@ -55,6 +55,12 @@ parameters: description: The type of device you want to build for. type: string default: "iPhone 11" + device_id: + description: UUID of device you want to build for. + type: string + device_os: + description: OS of device you want to build for, e.g 18.5. + type: string scheme: description: The scheme to use. type: string @@ -132,6 +138,8 @@ steps: project_path: <> derived_data_path: <> device: <> + device_id: <> + device_os: <> build_configuration: <> scheme: <> project_type: <> From 2f67d7e6a4c32a0ee492383540199458d87d8bd0 Mon Sep 17 00:00:00 2001 From: MateusAndrade Date: Fri, 7 Nov 2025 11:47:27 +0100 Subject: [PATCH 2/2] ci(ios): adding default arguments --- src/commands/ios_build.yml | 6 ++++-- src/jobs/ios_build.yml | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/commands/ios_build.yml b/src/commands/ios_build.yml index 939dca7..bd86f2f 100644 --- a/src/commands/ios_build.yml +++ b/src/commands/ios_build.yml @@ -24,9 +24,11 @@ parameters: device_id: description: UUID of device you want to build for. type: string + default: "" device_os: description: OS of device you want to build for, e.g 18.5. type: string + default: "" scheme: description: The scheme to use. type: string @@ -48,10 +50,10 @@ steps: name: Build iOS App command: | DESTINATION="platform=iOS Simulator,name=<>" - if [ -n "<>" ]; then + if [ "<>" != "" ]; then DESTINATION="${DESTINATION},id=<>" fi - if [ -n "<>" ]; then + if [ "<>" != "" ]; then DESTINATION="${DESTINATION},OS=<>" fi export RCT_NO_LAUNCH_PACKAGER=true diff --git a/src/jobs/ios_build.yml b/src/jobs/ios_build.yml index b8eca9d..1014d9a 100644 --- a/src/jobs/ios_build.yml +++ b/src/jobs/ios_build.yml @@ -58,9 +58,11 @@ parameters: device_id: description: UUID of device you want to build for. type: string + default: "" device_os: description: OS of device you want to build for, e.g 18.5. type: string + default: "" scheme: description: The scheme to use. type: string