Skip to content

Commit

Permalink
Merge pull request #4490 from aeddi/fix/mobile-build
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Eddi committed Nov 10, 2022
2 parents f05f77d + 7668a99 commit f13c398
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 11 deletions.
5 changes: 5 additions & 0 deletions js/ios/Podfile
Expand Up @@ -59,6 +59,11 @@ use_react_native!(
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end
end
6 changes: 3 additions & 3 deletions js/ios/Podfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/ios/berty.yaml
Expand Up @@ -203,7 +203,7 @@ targets:
postBuildScripts:
- name: Bundle React Native code and images
script: |
export NODE_BINARY=node
export NODE_BINARY="$(zsh -ilc 'asdf which node' 2> /dev/null || echo node)"
export ENTRY_FILE=index.ts
../node_modules/react-native/scripts/react-native-xcode.sh
Expand Down
2 changes: 1 addition & 1 deletion js/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions js/patches/expo-constants+13.0.2.patch
@@ -0,0 +1,13 @@
diff --git a/node_modules/expo-constants/ios/EXConstants.podspec b/node_modules/expo-constants/ios/EXConstants.podspec
index c45ac48..cdeee4c 100644
--- a/node_modules/expo-constants/ios/EXConstants.podspec
+++ b/node_modules/expo-constants/ios/EXConstants.podspec
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|

s.script_phase = {
:name => 'Generate app.config for prebuilt Constants.manifest',
- :script => 'bash -l -c "$PODS_TARGET_SRCROOT/../scripts/get-app-config-ios.sh"',
+ :script => "export NODE_BINARY=\"$(zsh -ilc 'asdf which node' 2> /dev/null || echo '')\"\nbash -l -c \"$PODS_TARGET_SRCROOT/../scripts/get-app-config-ios.sh\"",
:execution_position => :before_compile
}

Expand Up @@ -11,7 +11,7 @@ index dd34c98..f406bbe 100644

packageTask.dependsOn(currentAssetsCopyTask)
diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb
index db9a34a..86d02ac 100644
index db9a34a..8c125ff 100644
--- a/node_modules/react-native/scripts/react_native_pods.rb
+++ b/node_modules/react-native/scripts/react_native_pods.rb
@@ -165,7 +165,9 @@ def use_react_native_codegen!(spec, options={})
Expand All @@ -30,7 +30,7 @@ index db9a34a..86d02ac 100644
:input_files => [srcs_dir],
:output_files => ["$(DERIVED_FILE_DIR)/codegen-#{codegen_modules_library_name}.log"].concat(generated_files),
- :script => "set -o pipefail\n\nbash -l -c '#{env_vars} CODEGEN_MODULES_LIBRARY_NAME=#{codegen_modules_library_name} #{File.join(__dir__, "generate-specs.sh")}' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
+ :script => "set -o pipefail\n\nbash -l -c '#{env_vars} CODEGEN_MODULES_LIBRARY_NAME=#{codegen_modules_library_name} ../../node_modules/react-native/scripts/generate-specs.sh' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
+ :script => "set -o pipefail\nexport NODE_BINARY=\"$(zsh -ilc 'asdf which node' 2> /dev/null || echo '')\"\nbash -l -c '#{env_vars} CODEGEN_MODULES_LIBRARY_NAME=#{codegen_modules_library_name} ../../node_modules/react-native/scripts/generate-specs.sh' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
:execution_position => :before_compile,
:show_env_vars_in_log => true
}
Expand Down
8 changes: 4 additions & 4 deletions js/yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f13c398

Please sign in to comment.