mirror of
https://github.com/stablyai/orca.git
synced 2026-11-14 18:07:45 +00:00
fix(mobile): build iOS from checkout paths with spaces (#37058)
* fix(mobile): quote expo-constants iOS build paths so checkouts with spaces build Backports the expo-constants 58 quoting of the app.config build phase (podspec bash -l -c argument and basename $PROJECT_DIR) to 55.0.17. * fix(mobile): quote react-native-xcode.sh call in the iOS bundle phase Expo SDK 55's template leaves the command substitution unquoted, so the Bundle React Native code and images phase splits a checkout path with a space. Expo's SDK 58 template applies the same quoting.
This commit is contained in:
@@ -113,6 +113,7 @@
|
||||
"./plugins/android-window-density.js",
|
||||
"./plugins/ios-pod-deployment-target-floor.js",
|
||||
"./plugins/ios-scene-lifecycle.js",
|
||||
"./plugins/ios-bundle-phase-quoted-script-path.js",
|
||||
[
|
||||
"expo-splash-screen",
|
||||
{
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
diff --git a/ios/EXConstants.podspec b/ios/EXConstants.podspec
|
||||
index fc4608aec9d7ac1e884cb6c57aaf0886f9ff6bbe..26b96c970acfbe66af00270683b21d150e27314e 100644
|
||||
--- a/ios/EXConstants.podspec
|
||||
+++ b/ios/EXConstants.podspec
|
||||
@@ -34,10 +34,11 @@ Pod::Spec.new do |s|
|
||||
s.source_files = "**/*.{h,m,swift}"
|
||||
end
|
||||
|
||||
- env_vars = ENV['PROJECT_ROOT'] ? "PROJECT_ROOT=#{ENV['PROJECT_ROOT']} " : ""
|
||||
+ # Orca: `bash -l -c` re-parses its argument, so keep paths quoted for checkouts with spaces (upstream fix in expo-constants 58).
|
||||
+ env_vars = ENV['PROJECT_ROOT'] ? "PROJECT_ROOT=\\\"#{ENV['PROJECT_ROOT']}\\\" " : ""
|
||||
script_phase = {
|
||||
:name => 'Generate app.config for prebuilt Constants.manifest',
|
||||
- :script => "bash -l -c \"#{env_vars}$PODS_TARGET_SRCROOT/../scripts/get-app-config-ios.sh\"",
|
||||
+ :script => "bash -l -c \"#{env_vars}\\\"$PODS_TARGET_SRCROOT/../scripts/get-app-config-ios.sh\\\"\"",
|
||||
:execution_position => :before_compile
|
||||
}
|
||||
# :always_out_of_date is only available in CocoaPods 1.13.0 and later
|
||||
diff --git a/scripts/get-app-config-ios.sh b/scripts/get-app-config-ios.sh
|
||||
index b612e095ea509f92dac967540f50353507a8ff51..d416e082d219a99ac732e1ae9802bc6cd0de0bfb 100755
|
||||
--- a/scripts/get-app-config-ios.sh
|
||||
+++ b/scripts/get-app-config-ios.sh
|
||||
@@ -11,7 +11,7 @@ EXPO_CONSTANTS_PACKAGE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||
# `$PROJECT_DIR` is passed by Xcode as the directory to the xcodeproj file.
|
||||
# in classic main project setup it is something like /path/to/app/ios
|
||||
# in new style pod project setup it is something like /path/to/app/ios/Pods
|
||||
-PROJECT_DIR_BASENAME=$(basename $PROJECT_DIR)
|
||||
+PROJECT_DIR_BASENAME=$(basename "$PROJECT_DIR")
|
||||
if [ "x$PROJECT_DIR_BASENAME" != "xPods" ]; then
|
||||
exit 0
|
||||
fi
|
||||
@@ -0,0 +1,24 @@
|
||||
const { withXcodeProject } = require('expo/config-plugins')
|
||||
|
||||
// Why: Expo SDK 55's template runs react-native-xcode.sh through an unquoted command substitution,
|
||||
// so a checkout path with a space splits and "Bundle React Native code and images" fails. Expo's
|
||||
// SDK 58 template quotes it the same way; drop this plugin then.
|
||||
const BUNDLE_PHASE_NAME = '"Bundle React Native code and images"'
|
||||
// The pbxproj keeps shellScript escaped, so quotes appear as \" and newlines as \n.
|
||||
const SCRIPT_CALL =
|
||||
"`\\\"$NODE_BINARY\\\" --print \\\"require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/react-native-xcode.sh'\\\"`"
|
||||
|
||||
module.exports = function withIosBundlePhaseQuotedScriptPath(config) {
|
||||
return withXcodeProject(config, (cfg) => {
|
||||
const phases = cfg.modResults.hash.project.objects.PBXShellScriptBuildPhase ?? {}
|
||||
for (const phase of Object.values(phases)) {
|
||||
if (typeof phase === 'object' && phase.name === BUNDLE_PHASE_NAME) {
|
||||
phase.shellScript = phase.shellScript.replace(
|
||||
`\\n${SCRIPT_CALL}\\n`,
|
||||
`\\n\\"${SCRIPT_CALL}\\"\\n`
|
||||
)
|
||||
}
|
||||
}
|
||||
return cfg
|
||||
})
|
||||
}
|
||||
Generated
+9
-8
@@ -175,6 +175,7 @@ patchedDependencies:
|
||||
'@expo/cli@55.0.36': 9ccdef43e1ef80ee4d68b4ed213c145660c2dcf4241cab6593da42f0847583c7
|
||||
'@xterm/addon-webgl@0.20.0-beta.300': 5349718f2c19d9319a81552580bf9618ded9b00f3707a5c6cdbbae1910849cd9
|
||||
braces@3.0.3: c07bb14cec04bc891e1fe529720444cc9729a25117f9aaf24253cfe3132a34fd
|
||||
expo-constants@55.0.17: d04144bdf6a998301b835602c910db11740c5ebe0eaeb11d377d967a31440ff0
|
||||
expo-notifications@55.0.27: ce20843a3daad4185d7e8571788fa323ba4d11984936188790858650a61749c0
|
||||
expo-router@55.0.18: 5cdc178be0ec617ebb8dec85eebe4effeca13a6551b87fcb7bcd20ec0d2a313d
|
||||
node-forge@1.4.0: 2798686e4488058ad81c3b8e32eb763c0feff21f4c717ce4d13b6ef2432cd5b8
|
||||
@@ -226,7 +227,7 @@ importers:
|
||||
version: 55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(react@19.2.8)
|
||||
expo-constants:
|
||||
specifier: ^55.0.17
|
||||
version: 55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
version: 55.0.17(patch_hash=d04144bdf6a998301b835602c910db11740c5ebe0eaeb11d377d967a31440ff0)(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
expo-crypto:
|
||||
specifier: ^55.0.19
|
||||
version: 55.0.19(expo@55.0.31)
|
||||
@@ -9247,7 +9248,7 @@ snapshots:
|
||||
dependencies:
|
||||
debug: 4.4.3(supports-color@8.1.1)
|
||||
expo: 55.0.31(ffb18d8db340712289e23538af5a7293)
|
||||
expo-constants: 55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
expo-constants: 55.0.17(patch_hash=d04144bdf6a998301b835602c910db11740c5ebe0eaeb11d377d967a31440ff0)(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
expo-font: 55.0.8(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(react@19.2.8)
|
||||
expo-server: 55.0.12
|
||||
react: 19.2.8
|
||||
@@ -12174,7 +12175,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@expo/image-utils': 0.8.17(supports-color@8.1.1)(typescript@7.0.2)
|
||||
expo: 55.0.31(ffb18d8db340712289e23538af5a7293)
|
||||
expo-constants: 55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
expo-constants: 55.0.17(patch_hash=d04144bdf6a998301b835602c910db11740c5ebe0eaeb11d377d967a31440ff0)(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
react: 19.2.8
|
||||
react-native: 0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1)
|
||||
transitivePeerDependencies:
|
||||
@@ -12205,7 +12206,7 @@ snapshots:
|
||||
react: 19.2.8
|
||||
react-native: 0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1)
|
||||
|
||||
expo-constants@55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1):
|
||||
expo-constants@55.0.17(patch_hash=d04144bdf6a998301b835602c910db11740c5ebe0eaeb11d377d967a31440ff0)(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1):
|
||||
dependencies:
|
||||
'@expo/env': 2.1.3(supports-color@8.1.1)
|
||||
expo: 55.0.31(ffb18d8db340712289e23538af5a7293)
|
||||
@@ -12295,7 +12296,7 @@ snapshots:
|
||||
|
||||
expo-linking@55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(react@19.2.8)(supports-color@8.1.1):
|
||||
dependencies:
|
||||
expo-constants: 55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
expo-constants: 55.0.17(patch_hash=d04144bdf6a998301b835602c910db11740c5ebe0eaeb11d377d967a31440ff0)(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
invariant: 2.2.4
|
||||
react: 19.2.8
|
||||
react-native: 0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1)
|
||||
@@ -12390,7 +12391,7 @@ snapshots:
|
||||
badgin: 1.2.3
|
||||
expo: 55.0.31(ffb18d8db340712289e23538af5a7293)
|
||||
expo-application: 55.0.19(expo@55.0.31)
|
||||
expo-constants: 55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
expo-constants: 55.0.17(patch_hash=d04144bdf6a998301b835602c910db11740c5ebe0eaeb11d377d967a31440ff0)(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
react: 19.2.8
|
||||
react-native: 0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1)
|
||||
transitivePeerDependencies:
|
||||
@@ -12411,7 +12412,7 @@ snapshots:
|
||||
debug: 4.4.3(supports-color@8.1.1)
|
||||
escape-string-regexp: 4.0.0
|
||||
expo: 55.0.31(ffb18d8db340712289e23538af5a7293)
|
||||
expo-constants: 55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
expo-constants: 55.0.17(patch_hash=d04144bdf6a998301b835602c910db11740c5ebe0eaeb11d377d967a31440ff0)(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
expo-glass-effect: 55.0.11(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(react@19.2.8)
|
||||
expo-image: 55.0.11(expo@55.0.31)(react-native-web@0.21.3(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(react@19.2.8)
|
||||
expo-linking: 55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(react@19.2.8)(supports-color@8.1.1)
|
||||
@@ -12501,7 +12502,7 @@ snapshots:
|
||||
'@ungap/structured-clone': 1.3.1
|
||||
babel-preset-expo: 55.0.25(@babel/core@7.29.7(supports-color@8.1.1))(@babel/runtime@7.29.7)(expo@55.0.31)(react-refresh@0.14.2)(supports-color@8.1.1)
|
||||
expo-asset: 55.0.20(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(react@19.2.8)(supports-color@8.1.1)(typescript@7.0.2)
|
||||
expo-constants: 55.0.17(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
expo-constants: 55.0.17(patch_hash=d04144bdf6a998301b835602c910db11740c5ebe0eaeb11d377d967a31440ff0)(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(supports-color@8.1.1)
|
||||
expo-file-system: 55.0.26(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))
|
||||
expo-font: 55.0.8(expo@55.0.31)(react-native@0.83.10(patch_hash=22bc31f0a057b1f96d9949b38a7ccde81225f617c0f243820dc8a455c91debfb)(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.8)(supports-color@8.1.1))(react@19.2.8)
|
||||
expo-keep-awake: 55.0.8(expo@55.0.31)(react@19.2.8)
|
||||
|
||||
@@ -30,3 +30,4 @@ patchedDependencies:
|
||||
node-forge@1.4.0: patches/node-forge@1.4.0.patch
|
||||
'@expo/cli@55.0.36': patches/@expo__cli@55.0.36.patch
|
||||
expo-router@55.0.18: patches/expo-router@55.0.18.patch
|
||||
expo-constants@55.0.17: patches/expo-constants@55.0.17.patch
|
||||
|
||||
Reference in New Issue
Block a user