diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj
index a1a54229b545b4..a987b1f8508745 100644
--- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj
+++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 53;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@@ -571,7 +571,7 @@
isa = PBXNativeTarget;
buildConfigurationList = B20252A12459E34F00F97062 /* Build configuration list for PBXNativeTarget "Matter" */;
buildPhases = (
- 0C40A67D246C9AC700885C81 /* Run Script */,
+ 0C40A67D246C9AC700885C81 /* Run GN Build (chip_xcode_build_connector) */,
B20252882459E34F00F97062 /* Headers */,
B20252892459E34F00F97062 /* Sources */,
B202528A2459E34F00F97062 /* Frameworks */,
@@ -659,8 +659,9 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 0C40A67D246C9AC700885C81 /* Run Script */ = {
+ 0C40A67D246C9AC700885C81 /* Run GN Build (chip_xcode_build_connector) */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -668,7 +669,7 @@
);
inputPaths = (
);
- name = "Run Script";
+ name = "Run GN Build (chip_xcode_build_connector)";
outputFileListPaths = (
);
outputPaths = (
diff --git a/src/darwin/Framework/Matter.xcodeproj/xcshareddata/xcschemes/Matter Framework.xcscheme b/src/darwin/Framework/Matter.xcodeproj/xcshareddata/xcschemes/Matter Framework.xcscheme
index daea75f7e7e690..83717233f5a54a 100644
--- a/src/darwin/Framework/Matter.xcodeproj/xcshareddata/xcschemes/Matter Framework.xcscheme
+++ b/src/darwin/Framework/Matter.xcodeproj/xcshareddata/xcschemes/Matter Framework.xcscheme
@@ -28,6 +28,16 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
+
+
+
+
&2
- ;;
-esac
-
-declare target_cflags=""
+declare target_cflags=
read -r -a archs <<<"$ARCHS"
-
for arch in "${archs[@]}"; do
+ if [ -z "$target_arch"] ]; then
+ target_arch="$arch"
+ case "$arch" in
+ x86_64) target_cpu="x64" ;;
+ *) target_cpu="$arch" ;;
+ esac
+ fi
if [ -n "$target_cflags" ]; then
target_cflags+=','
fi
@@ -102,14 +91,14 @@ declare -a args=(
'chip_enable_wifi=false'
'chip_log_message_max_size=4096' # might as well allow nice long log messages
'chip_disable_platform_kvs=true'
- 'target_cpu="'"$target_cpu"'"'
- 'target_defines='"$target_defines"
- 'target_cflags=['"$target_cflags"']'
- 'mac_target_arch="'"$PLATFORM_PREFERRED_ARCH"'"'
- 'mac_deployment_target="'"$LLVM_TARGET_TRIPLE_OS_VERSION"''"$LLVM_TARGET_TRIPLE_SUFFIX"'"'
+ "target_cpu=\"$target_cpu\""
+ "target_defines=$target_defines"
+ "target_cflags=[$target_cflags]"
+ "mac_target_arch=\"$target_arch\""
+ "mac_deployment_target=\"$LLVM_TARGET_TRIPLE_OS_VERSION$LLVM_TARGET_TRIPLE_SUFFIX\""
)
-[[ $CONFIGURATION != Debug* ]] && args+='is_debug=true'
+[[ $CONFIGURATION == Debug ]] && args+=('is_debug=true')
[[ $PLATFORM_FAMILY_NAME != macOS ]] && {
args+=(
@@ -142,7 +131,7 @@ find_in_ancestors() {
}
# actual build stuff
-(
+{
cd "$CHIP_ROOT" # pushd and popd because we need the env vars from activate
if ENV=$(find_in_ancestors chip_xcode_build_connector_env.sh 2>/dev/null); then
@@ -163,7 +152,7 @@ find_in_ancestors() {
# put build intermediates in TEMP_DIR
cd "$TEMP_DIR"
- # gnerate and build
+ # generate and build
gn --root="$CHIP_ROOT" gen --check out --args="${args[*]}"
- ninja -v -C out
-)
+ exec ninja -v -C out
+}