From 95c7b4abdf747e31719aec0261c361b3a352801f Mon Sep 17 00:00:00 2001 From: aeddi Date: Thu, 10 Nov 2022 19:05:14 +0100 Subject: [PATCH 1/3] fix: ios pods error signing dev team Signed-off-by: aeddi --- js/ios/Podfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/ios/Podfile b/js/ios/Podfile index 40acc9f24d..dd762bdebe 100644 --- a/js/ios/Podfile +++ b/js/ios/Podfile @@ -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 From 8cffdda91f91025d43a7d634e54835809ebd55c8 Mon Sep 17 00:00:00 2001 From: aeddi Date: Thu, 10 Nov 2022 21:27:11 +0100 Subject: [PATCH 2/3] fix: support asdf node bin Signed-off-by: aeddi --- js/ios/Podfile.lock | 6 +++--- js/ios/berty.yaml | 2 +- js/patches/expo-constants+13.0.2.patch | 13 +++++++++++++ js/patches/react-native+0.64.2.patch | 4 ++-- 4 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 js/patches/expo-constants+13.0.2.patch diff --git a/js/ios/Podfile.lock b/js/ios/Podfile.lock index 262a3eded2..01b9e612af 100644 --- a/js/ios/Podfile.lock +++ b/js/ios/Podfile.lock @@ -658,7 +658,7 @@ SPEC CHECKSUMS: EXApplication: 54fe5bd6268d697771645e8f1aef8b806a65247a EXBarCodeScanner: e5ca0062d8ad1c4c1d2e386d6a308d5a32213020 EXCamera: 4a0d00d6d1e4703c31a75514d8bc804a2eab27bd - EXConstants: 88bf79622fbd9b476c96d8ec57fe97ca44fe8e3c + EXConstants: d2594b4b1c48a2c6933622dbc2156543cfd5326b EXErrorRecovery: b0d7582714a2cc896e94a2308a356f94dbf14ef7 EXFileSystem: 08a3033ac372b6346becf07839e1ccef26fb1058 EXFont: 2597c10ac85a69d348d44d7873eccf5a7576ef5e @@ -669,7 +669,7 @@ SPEC CHECKSUMS: Expo: 534e51e607aba8229293297da5585f4b26f50fa1 ExpoModulesCore: 32c0ccb47f477d330ee93db72505380adf0de09a FBLazyVector: e686045572151edef46010a6f819ade377dfeb4b - FBReactNativeSpec: b30928116374479d80d407d74915cc3d0ff13635 + FBReactNativeSpec: baa31ec3573e399f9f6c7f7ac2c605ed811df8b9 Flipper: 1bd2db48dcc31e4b167b9a33ec1df01c2ded4893 Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 Flipper-Folly: 755929a4f851b2fb2c347d533a23f191b008554c @@ -731,6 +731,6 @@ SPEC CHECKSUMS: YogaKit: f782866e155069a2cca2517aafea43200b01fd5a ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb -PODFILE CHECKSUM: 48973c14d60dd7d19ce85555cfab9860608c95ce +PODFILE CHECKSUM: 74d1603c5d5208e5c5c7543ff40bb9ca813f4f67 COCOAPODS: 1.11.3 diff --git a/js/ios/berty.yaml b/js/ios/berty.yaml index 6338797cc4..31850003d2 100644 --- a/js/ios/berty.yaml +++ b/js/ios/berty.yaml @@ -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 diff --git a/js/patches/expo-constants+13.0.2.patch b/js/patches/expo-constants+13.0.2.patch new file mode 100644 index 0000000000..3aa8027793 --- /dev/null +++ b/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 + } + diff --git a/js/patches/react-native+0.64.2.patch b/js/patches/react-native+0.64.2.patch index 1b0a9ed1da..7209e6a188 100644 --- a/js/patches/react-native+0.64.2.patch +++ b/js/patches/react-native+0.64.2.patch @@ -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={}) @@ -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 } From 7668a99f52b4f7b2a1c7dcd87a49f1e87e091c21 Mon Sep 17 00:00:00 2001 From: aeddi Date: Thu, 10 Nov 2022 22:21:36 +0100 Subject: [PATCH 3/3] fix: android build using rn 0.64.4 Signed-off-by: aeddi --- js/package.json | 2 +- ...eact-native+0.64.2.patch => react-native+0.64.4.patch} | 0 js/yarn.lock | 8 ++++---- 3 files changed, 5 insertions(+), 5 deletions(-) rename js/patches/{react-native+0.64.2.patch => react-native+0.64.4.patch} (100%) diff --git a/js/package.json b/js/package.json index 5a5338a872..4613065685 100644 --- a/js/package.json +++ b/js/package.json @@ -46,7 +46,7 @@ "protobufjs": "^6.10.2", "react": "17.0.2", "react-i18next": "^11.14.3", - "react-native": "0.64.2", + "react-native": "0.64.4", "react-native-android-keyboard-adjust": "^1.2.0", "react-native-bootsplash": "^3.2.6", "react-native-document-picker": "^7.1.1", diff --git a/js/patches/react-native+0.64.2.patch b/js/patches/react-native+0.64.4.patch similarity index 100% rename from js/patches/react-native+0.64.2.patch rename to js/patches/react-native+0.64.4.patch diff --git a/js/yarn.lock b/js/yarn.lock index 6a2463f1b7..22f478e941 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -13707,10 +13707,10 @@ react-native-webview@^11.14.3: escape-string-regexp "2.0.0" invariant "2.2.4" -react-native@0.64.2: - version "0.64.2" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.64.2.tgz#233b6ed84ac4749c8bc2a2d6cf63577a1c437d18" - integrity sha512-Ty/fFHld9DcYsFZujXYdeVjEhvSeQcwuTGXezyoOkxfiGEGrpL/uwUZvMzwShnU4zbbTKDu2PAm/uwuOittRGA== +react-native@0.64.4: + version "0.64.4" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.64.4.tgz#f9870f6951378421881cc66f6b5a6451bef7254d" + integrity sha512-nxYt/NrTmGyW6+tOd+Hqp4O8uJ2LLZkN7ispMPDprAq7bwvLkF/GXmDQCZHAEyqXuhIztTtMX41KqFQ6UMCUJQ== dependencies: "@jest/create-cache-key-function" "^26.5.0" "@react-native-community/cli" "^5.0.1-alpha.1"