react-native 0.72.3 → 0.72.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +1 -0
  2. package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +1 -0
  3. package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +1 -0
  4. package/Libraries/Components/TextInput/TextInput.d.ts +15 -0
  5. package/Libraries/Components/TextInput/TextInput.js +8 -3
  6. package/Libraries/Core/ReactNativeVersion.js +1 -1
  7. package/Libraries/ReactNative/AppContainer.js +32 -9
  8. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -0
  9. package/React/Base/RCTBundleURLProvider.h +33 -2
  10. package/React/Base/RCTBundleURLProvider.mm +78 -15
  11. package/React/Base/RCTVersion.m +1 -1
  12. package/React/CoreModules/RCTTiming.mm +5 -0
  13. package/ReactAndroid/gradle.properties +1 -1
  14. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +19 -1
  15. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +37 -10
  16. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  17. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java +6 -1
  18. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java +4 -0
  19. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +6 -1
  20. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +19 -0
  21. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +65 -0
  22. package/ReactAndroid/src/main/jni/CMakeLists.txt +5 -0
  23. package/ReactCommon/React-Fabric.podspec +1 -1
  24. package/ReactCommon/ReactCommon.podspec +1 -1
  25. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  26. package/ReactCommon/jsc/JSCRuntime.cpp +10 -0
  27. package/ReactCommon/react/debug/React-debug.podspec +1 -1
  28. package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -1
  29. package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
  30. package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.cpp +15 -1
  31. package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h +1 -0
  32. package/ReactCommon/react/renderer/core/RawPropsKeyMap.cpp +2 -0
  33. package/ReactCommon/react/renderer/core/RawPropsParser.cpp +1 -0
  34. package/ReactCommon/react/renderer/core/RawPropsPrimitives.h +4 -4
  35. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
  36. package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -1
  37. package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +9 -5
  38. package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +1 -1
  39. package/ReactCommon/react/utils/React-utils.podspec +1 -1
  40. package/package.json +8 -8
  41. package/scripts/cocoapods/__tests__/test_utils/XcodebuildMock.rb +26 -0
  42. package/scripts/cocoapods/__tests__/utils-test.rb +115 -18
  43. package/scripts/cocoapods/helpers.rb +16 -0
  44. package/scripts/cocoapods/jsengine.rb +1 -1
  45. package/scripts/cocoapods/utils.rb +97 -8
  46. package/scripts/react_native_pods.rb +6 -2
  47. package/sdks/.hermesversion +1 -1
  48. package/sdks/hermes-engine/utils/build-apple-framework.sh +8 -1
  49. package/sdks/hermes-engine/utils/build-hermes-xcode.sh +8 -0
  50. package/sdks/hermesc/osx-bin/hermesc +0 -0
  51. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  52. package/template/package.json +3 -3
@@ -121,16 +121,31 @@ class ReactNativePodsUtils
121
121
  end
122
122
  end
123
123
 
124
- def self.apply_xcode_15_patch(installer)
125
- installer.target_installation_results.pod_target_installation_results
126
- .each do |pod_name, target_installation_result|
127
- target_installation_result.native_target.build_configurations.each do |config|
128
- # unary_function and binary_function are no longer provided in C++17 and newer standard modes as part of Xcode 15. They can be re-enabled with setting _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION
129
- # Ref: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Deprecations
130
- config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= '$(inherited) '
131
- config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << '"_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION" '
124
+ def self.apply_xcode_15_patch(installer, xcodebuild_manager: Xcodebuild)
125
+ projects = self.extract_projects(installer)
126
+
127
+ gcc_preprocessor_definition_key = 'GCC_PREPROCESSOR_DEFINITIONS'
128
+ other_ld_flags_key = 'OTHER_LDFLAGS'
129
+ libcpp_cxx17_fix = '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION'
130
+ xcode15_compatibility_flags = '-Wl -ld_classic '
131
+
132
+ projects.each do |project|
133
+ project.build_configurations.each do |config|
134
+ # fix for unary_function and binary_function
135
+ self.safe_init(config, gcc_preprocessor_definition_key)
136
+ self.add_value_to_setting_if_missing(config, gcc_preprocessor_definition_key, libcpp_cxx17_fix)
137
+
138
+ # fix for weak linking
139
+ self.safe_init(config, other_ld_flags_key)
140
+ if self.is_using_xcode15_or_greter(:xcodebuild_manager => xcodebuild_manager)
141
+ self.add_value_to_setting_if_missing(config, other_ld_flags_key, xcode15_compatibility_flags)
142
+ else
143
+ self.remove_value_to_setting_if_present(config, other_ld_flags_key, xcode15_compatibility_flags)
144
+ end
132
145
  end
146
+ project.save()
133
147
  end
148
+
134
149
  end
135
150
 
136
151
  def self.apply_flags_for_fabric(installer, fabric_enabled: false)
@@ -232,6 +247,37 @@ class ReactNativePodsUtils
232
247
  end
233
248
  end
234
249
 
250
+ def self.updateIphoneOSDeploymentTarget(installer)
251
+ pod_to_update = Set.new([
252
+ "boost",
253
+ "CocoaAsyncSocket",
254
+ "Flipper",
255
+ "Flipper-DoubleConversion",
256
+ "Flipper-Fmt",
257
+ "Flipper-Boost-iOSX",
258
+ "Flipper-Folly",
259
+ "Flipper-Glog",
260
+ "Flipper-PeerTalk",
261
+ "FlipperKit",
262
+ "fmt",
263
+ "libevent",
264
+ "OpenSSL-Universal",
265
+ "RCT-Folly",
266
+ "SocketRocket",
267
+ "YogaKit"
268
+ ])
269
+
270
+ installer.target_installation_results.pod_target_installation_results
271
+ .each do |pod_name, target_installation_result|
272
+ unless pod_to_update.include?(pod_name)
273
+ next
274
+ end
275
+ target_installation_result.native_target.build_configurations.each do |config|
276
+ config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = Helpers::Constants.min_ios_version_supported
277
+ end
278
+ end
279
+ end
280
+
235
281
  # ========= #
236
282
  # Utilities #
237
283
  # ========= #
@@ -243,6 +289,49 @@ class ReactNativePodsUtils
243
289
  .push(installer.pods_project)
244
290
  end
245
291
 
292
+ def self.safe_init(config, setting_name)
293
+ old_config = config.build_settings[setting_name]
294
+ if old_config == nil
295
+ config.build_settings[setting_name] ||= '$(inherited) '
296
+ end
297
+ end
298
+
299
+ def self.add_value_to_setting_if_missing(config, setting_name, value)
300
+ old_config = config.build_settings[setting_name]
301
+ if !old_config.include?(value)
302
+ config.build_settings[setting_name] << value
303
+ end
304
+ end
305
+
306
+ def self.remove_value_to_setting_if_present(config, setting_name, value)
307
+ old_config = config.build_settings[setting_name]
308
+ if old_config.include?(value)
309
+ # Old config can be either an Array or a String
310
+ if old_config.is_a?(Array)
311
+ old_config = old_config.join(" ")
312
+ end
313
+ new_config = old_config.gsub(value, "")
314
+ config.build_settings[setting_name] = new_config
315
+ end
316
+ end
317
+
318
+ def self.is_using_xcode15_or_greter(xcodebuild_manager: Xcodebuild)
319
+ xcodebuild_version = xcodebuild_manager.version
320
+
321
+ # The output of xcodebuild -version is something like
322
+ # Xcode 15.0
323
+ # or
324
+ # Xcode 14.3.1
325
+ # We want to capture the version digits
326
+ regex = /(\d+)\.(\d+)(?:\.(\d+))?/
327
+ if match_data = xcodebuild_version.match(regex)
328
+ major = match_data[1].to_i
329
+ return major >= 15
330
+ end
331
+
332
+ return false
333
+ end
334
+
246
335
  def self.add_compiler_flag_to_project(installer, flag, configuration: nil)
247
336
  projects = self.extract_projects(installer)
248
337
 
@@ -15,6 +15,7 @@ require_relative './cocoapods/codegen_utils.rb'
15
15
  require_relative './cocoapods/utils.rb'
16
16
  require_relative './cocoapods/new_architecture.rb'
17
17
  require_relative './cocoapods/local_podspec_patch.rb'
18
+ require_relative './cocoapods/helpers.rb'
18
19
 
19
20
  $CODEGEN_OUTPUT_DIR = 'build/generated/ios'
20
21
  $CODEGEN_COMPONENT_DIR = 'react/renderer/components'
@@ -34,11 +35,12 @@ require Pod::Executable.execute_command('node', ['-p',
34
35
  {paths: [process.argv[1]]},
35
36
  )', __dir__]).strip
36
37
 
37
- # This function returns the min iOS version supported by React Native
38
+
39
+ # This function returns the min supported OS versions supported by React Native
38
40
  # By using this function, you won't have to manually change your Podfile
39
41
  # when we change the minimum version supported by the framework.
40
42
  def min_ios_version_supported
41
- return '12.4'
43
+ return Helpers::Constants.min_ios_version_supported
42
44
  end
43
45
 
44
46
  # This function prepares the project for React Native, before processing
@@ -245,11 +247,13 @@ def react_native_post_install(
245
247
  ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path)
246
248
  ReactNativePodsUtils.apply_flags_for_fabric(installer, fabric_enabled: fabric_enabled)
247
249
  ReactNativePodsUtils.apply_xcode_15_patch(installer)
250
+ ReactNativePodsUtils.updateIphoneOSDeploymentTarget(installer)
248
251
 
249
252
  NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
250
253
  is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == "1"
251
254
  NewArchitectureHelper.modify_flags_for_new_architecture(installer, is_new_arch_enabled)
252
255
 
256
+
253
257
  Pod::UI.puts "Pod install took #{Time.now.to_i - $START_TIME} [s] to run".green
254
258
  end
255
259
 
@@ -1 +1 @@
1
- hermes-2023-03-20-RNv0.72.0-49794cfc7c81fb8f69fd60c3bbf85a7480cc5a77
1
+ hermes-2023-08-07-RNv0.72.4-813b2def12bc9df02654b3e3653ae4a68d0572e0
@@ -52,7 +52,7 @@ function build_host_hermesc {
52
52
 
53
53
  # Utility function to configure an Apple framework
54
54
  function configure_apple_framework {
55
- local build_cli_tools enable_bitcode enable_debugger cmake_build_type
55
+ local build_cli_tools enable_bitcode enable_debugger cmake_build_type xcode_15_flags xcode_major_version
56
56
 
57
57
  if [[ $1 == iphoneos || $1 == catalyst ]]; then
58
58
  enable_bitcode="true"
@@ -77,8 +77,15 @@ function configure_apple_framework {
77
77
  cmake_build_type="MinSizeRel"
78
78
  fi
79
79
 
80
+ xcode_15_flags=""
81
+ xcode_major_version=$(xcodebuild -version | grep -oE '[0-9]*' | head -n 1)
82
+ if [[ $xcode_major_version -ge 15 ]]; then
83
+ xcode_15_flags="LINKER:-ld_classic"
84
+ fi
85
+
80
86
  pushd "$HERMES_PATH" > /dev/null || exit 1
81
87
  cmake -S . -B "build_$1" \
88
+ -DHERMES_EXTRA_LINKER_FLAGS="$xcode_15_flags" \
82
89
  -DHERMES_APPLE_TARGET_PLATFORM:STRING="$1" \
83
90
  -DCMAKE_OSX_ARCHITECTURES:STRING="$2" \
84
91
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="$3" \
@@ -33,6 +33,13 @@ if [ -z "$deployment_target" ]; then
33
33
  deployment_target=${MACOSX_DEPLOYMENT_TARGET}
34
34
  fi
35
35
 
36
+ xcode_15_flags=""
37
+ xcode_major_version=$(xcodebuild -version | grep -oE '[0-9]*' | head -n 1)
38
+ if [[ $xcode_major_version -ge 15 ]]; then
39
+ echo "########### Using LINKER:-ld_classic ###########"
40
+ xcode_15_flags="LINKER:-ld_classic"
41
+ fi
42
+
36
43
  architectures=$( echo "$ARCHS" | tr " " ";" )
37
44
 
38
45
  echo "Configure Apple framework"
@@ -40,6 +47,7 @@ echo "Configure Apple framework"
40
47
  "$CMAKE_BINARY" \
41
48
  -S "${PODS_ROOT}/hermes-engine" \
42
49
  -B "${PODS_ROOT}/hermes-engine/build/${PLATFORM_NAME}" \
50
+ -DHERMES_EXTRA_LINKER_FLAGS="$xcode_15_flags" \
43
51
  -DHERMES_APPLE_TARGET_PLATFORM:STRING="$PLATFORM_NAME" \
44
52
  -DCMAKE_OSX_ARCHITECTURES:STRING="$architectures" \
45
53
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="$deployment_target" \
Binary file
Binary file
@@ -11,21 +11,21 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "18.2.0",
14
- "react-native": "0.72.3"
14
+ "react-native": "0.72.5"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.20.0",
18
18
  "@babel/preset-env": "^7.20.0",
19
19
  "@babel/runtime": "^7.20.0",
20
20
  "@react-native/eslint-config": "^0.72.2",
21
- "@react-native/metro-config": "^0.72.9",
21
+ "@react-native/metro-config": "^0.72.11",
22
22
  "@tsconfig/react-native": "^3.0.0",
23
23
  "@types/react": "^18.0.24",
24
24
  "@types/react-test-renderer": "^18.0.0",
25
25
  "babel-jest": "^29.2.1",
26
26
  "eslint": "^8.19.0",
27
27
  "jest": "^29.2.1",
28
- "metro-react-native-babel-preset": "0.76.7",
28
+ "metro-react-native-babel-preset": "0.76.8",
29
29
  "prettier": "^2.4.1",
30
30
  "react-test-renderer": "18.2.0",
31
31
  "typescript": "4.8.4"