From a600bfb90bd4c0a16c2fbc973e2d394daf937c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwa=C5=9Bniewski?= Date: Mon, 25 Mar 2024 08:32:08 +0100 Subject: [PATCH] fix: hermes xcode build scripts (#133) --- .../sdks/hermes-engine/utils/build-hermes-xcode.sh | 9 ++++----- .../template/visionos/HelloWorld/AppDelegate.swift | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh b/packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh index 5ad2cb92907277..6062f221625d9d 100755 --- a/packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh +++ b/packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh @@ -16,10 +16,7 @@ function get_platform_copy_destination { if [[ $1 == "macosx" ]]; then echo "macosx" return - elif [[ $1 == "xros" ]]; then - echo "xros" - return - elif [[ $1 == "xrsimulator" ]]; then + elif [[ $1 == "xrsimulator" || $1 == "xros" ]]; then echo "xros" return fi @@ -31,8 +28,10 @@ function get_deployment_target { if [[ $1 == "macosx" ]]; then echo ${MACOSX_DEPLOYMENT_TARGET} return + elif [[ $1 == "xrsimulator" || $1 == "xros" ]]; then + echo ${XROS_DEPLOYMENT_TARGET} + return fi - echo ${IPHONEOS_DEPLOYMENT_TARGET} } diff --git a/packages/react-native/template/visionos/HelloWorld/AppDelegate.swift b/packages/react-native/template/visionos/HelloWorld/AppDelegate.swift index 1583449a06a0ae..4e68fb4c1bd7ab 100644 --- a/packages/react-native/template/visionos/HelloWorld/AppDelegate.swift +++ b/packages/react-native/template/visionos/HelloWorld/AppDelegate.swift @@ -9,7 +9,7 @@ class AppDelegate: RCTAppDelegate { override func bundleURL() -> URL? { #if DEBUG - RCTBundleURLProvider.sharedSettings()?.jsBundleURL(forBundleRoot: "index") + RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") #else Bundle.main.url(forResource: "main", withExtension: "jsbundle") #endif