react-native 0.71.13 → 0.71.14
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.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsc/JSCRuntime.cpp +10 -0
- package/package.json +3 -3
- package/scripts/cocoapods/helpers.rb +16 -0
- package/scripts/cocoapods/utils.rb +114 -9
- package/scripts/react_native_pods.rb +6 -3
- package/sdks/hermes-engine/utils/build-apple-framework.sh +8 -1
- package/sdks/hermes-engine/utils/build-hermes-xcode.sh +8 -0
- package/sdks/hermesc/linux64-bin/hermesc +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/Gemfile +1 -0
- package/template/package.json +1 -1
package/React/Base/RCTVersion.m
CHANGED
|
@@ -300,6 +300,9 @@ class JSCRuntime : public jsi::Runtime {
|
|
|
300
300
|
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0
|
|
301
301
|
#define _JSC_NO_ARRAY_BUFFERS
|
|
302
302
|
#endif
|
|
303
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 160400
|
|
304
|
+
#define _JSC_HAS_INSPECTABLE
|
|
305
|
+
#endif
|
|
303
306
|
#endif
|
|
304
307
|
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
|
|
305
308
|
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11
|
|
@@ -396,6 +399,13 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
|
|
|
396
399
|
stringCounter_(0)
|
|
397
400
|
#endif
|
|
398
401
|
{
|
|
402
|
+
#ifndef NDEBUG
|
|
403
|
+
#ifdef _JSC_HAS_INSPECTABLE
|
|
404
|
+
if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
|
|
405
|
+
JSGlobalContextSetInspectable(ctx_, true);
|
|
406
|
+
}
|
|
407
|
+
#endif
|
|
408
|
+
#endif
|
|
399
409
|
}
|
|
400
410
|
|
|
401
411
|
JSCRuntime::~JSCRuntime() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.14",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "A framework for building native apps using React",
|
|
6
6
|
"license": "MIT",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"use-sync-external-store": "^1.0.0",
|
|
145
145
|
"whatwg-fetch": "^3.0.0",
|
|
146
146
|
"ws": "^6.2.2",
|
|
147
|
-
"react-native-codegen": "^0.71.
|
|
147
|
+
"react-native-codegen": "^0.71.6"
|
|
148
148
|
},
|
|
149
149
|
"devDependencies": {
|
|
150
150
|
"flow-bin": "^0.191.0",
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"inquirer": "^7.1.0",
|
|
184
184
|
"jest": "^29.2.1",
|
|
185
185
|
"jest-junit": "^10.0.0",
|
|
186
|
-
"jscodeshift": "^0.
|
|
186
|
+
"jscodeshift": "^0.14.0",
|
|
187
187
|
"metro-babel-register": "0.73.10",
|
|
188
188
|
"metro-memory-fs": "0.73.10",
|
|
189
189
|
"mkdirp": "^0.5.1",
|
|
@@ -11,6 +11,14 @@ class SysctlChecker
|
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# Helper class that is used to easily send commands to Xcodebuild
|
|
15
|
+
# And that can be subclassed for testing purposes.
|
|
16
|
+
class Xcodebuild
|
|
17
|
+
def self.version
|
|
18
|
+
`xcodebuild -version`
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
14
22
|
# Helper object to wrap system properties like RUBY_PLATFORM
|
|
15
23
|
# This makes it easier to mock the behaviour in tests
|
|
16
24
|
class Environment
|
|
@@ -26,3 +34,11 @@ class Finder
|
|
|
26
34
|
return `find #{path} -type f \\( #{js_files} -or #{ts_files} \\)`.split("\n").sort()
|
|
27
35
|
end
|
|
28
36
|
end
|
|
37
|
+
|
|
38
|
+
module Helpers
|
|
39
|
+
class Constants
|
|
40
|
+
def self.min_ios_version_supported
|
|
41
|
+
return '12.4'
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -60,7 +60,7 @@ class ReactNativePodsUtils
|
|
|
60
60
|
.push(installer.pods_project)
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
# Hermes does not support
|
|
63
|
+
# Hermes does not support 'i386' architecture
|
|
64
64
|
excluded_archs_default = ReactNativePodsUtils.has_pod(installer, 'hermes-engine') ? "i386" : ""
|
|
65
65
|
|
|
66
66
|
projects.each do |project|
|
|
@@ -131,15 +131,29 @@ class ReactNativePodsUtils
|
|
|
131
131
|
end
|
|
132
132
|
end
|
|
133
133
|
|
|
134
|
-
def self.apply_xcode_15_patch(installer)
|
|
135
|
-
installer
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
134
|
+
def self.apply_xcode_15_patch(installer, xcodebuild_manager: Xcodebuild)
|
|
135
|
+
projects = self.extract_projects(installer)
|
|
136
|
+
|
|
137
|
+
gcc_preprocessor_definition_key = 'GCC_PREPROCESSOR_DEFINITIONS'
|
|
138
|
+
other_ld_flags_key = 'OTHER_LDFLAGS'
|
|
139
|
+
libcpp_cxx17_fix = '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION'
|
|
140
|
+
xcode15_compatibility_flags = '-Wl -ld_classic '
|
|
141
|
+
|
|
142
|
+
projects.each do |project|
|
|
143
|
+
project.build_configurations.each do |config|
|
|
144
|
+
# fix for unary_function and binary_function
|
|
145
|
+
self.safe_init(config, gcc_preprocessor_definition_key)
|
|
146
|
+
self.add_value_to_setting_if_missing(config, gcc_preprocessor_definition_key, libcpp_cxx17_fix)
|
|
147
|
+
|
|
148
|
+
# fix for weak linking
|
|
149
|
+
self.safe_init(config, other_ld_flags_key)
|
|
150
|
+
if self.is_using_xcode15_or_greter(:xcodebuild_manager => xcodebuild_manager)
|
|
151
|
+
self.add_value_to_setting_if_missing(config, other_ld_flags_key, xcode15_compatibility_flags)
|
|
152
|
+
else
|
|
153
|
+
self.remove_value_from_setting_if_present(config, other_ld_flags_key, xcode15_compatibility_flags)
|
|
154
|
+
end
|
|
142
155
|
end
|
|
156
|
+
project.save()
|
|
143
157
|
end
|
|
144
158
|
end
|
|
145
159
|
|
|
@@ -197,4 +211,95 @@ class ReactNativePodsUtils
|
|
|
197
211
|
ENV['USE_FRAMEWORKS'] = nil
|
|
198
212
|
end
|
|
199
213
|
end
|
|
214
|
+
|
|
215
|
+
def self.updateIphoneOSDeploymentTarget(installer)
|
|
216
|
+
pod_to_update = Set.new([
|
|
217
|
+
"boost",
|
|
218
|
+
"CocoaAsyncSocket",
|
|
219
|
+
"Flipper",
|
|
220
|
+
"Flipper-DoubleConversion",
|
|
221
|
+
"Flipper-Fmt",
|
|
222
|
+
"Flipper-Boost-iOSX",
|
|
223
|
+
"Flipper-Folly",
|
|
224
|
+
"Flipper-Glog",
|
|
225
|
+
"Flipper-PeerTalk",
|
|
226
|
+
"FlipperKit",
|
|
227
|
+
"fmt",
|
|
228
|
+
"libevent",
|
|
229
|
+
"OpenSSL-Universal",
|
|
230
|
+
"RCT-Folly",
|
|
231
|
+
"SocketRocket",
|
|
232
|
+
"YogaKit"
|
|
233
|
+
])
|
|
234
|
+
|
|
235
|
+
installer.target_installation_results.pod_target_installation_results
|
|
236
|
+
.each do |pod_name, target_installation_result|
|
|
237
|
+
unless pod_to_update.include?(pod_name)
|
|
238
|
+
next
|
|
239
|
+
end
|
|
240
|
+
target_installation_result.native_target.build_configurations.each do |config|
|
|
241
|
+
config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = Helpers::Constants.min_ios_version_supported
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# ========= #
|
|
247
|
+
# Utilities #
|
|
248
|
+
# ========= #
|
|
249
|
+
|
|
250
|
+
def self.extract_projects(installer)
|
|
251
|
+
return installer.aggregate_targets
|
|
252
|
+
.map{ |t| t.user_project }
|
|
253
|
+
.uniq{ |p| p.path }
|
|
254
|
+
.push(installer.pods_project)
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
def self.safe_init(config, setting_name)
|
|
258
|
+
old_config = config.build_settings[setting_name]
|
|
259
|
+
if old_config == nil
|
|
260
|
+
config.build_settings[setting_name] ||= '$(inherited) '
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
def self.add_value_to_setting_if_missing(config, setting_name, value)
|
|
265
|
+
old_config = config.build_settings[setting_name]
|
|
266
|
+
if old_config.is_a?(Array)
|
|
267
|
+
old_config = old_config.join(" ")
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
trimmed_value = value.strip()
|
|
271
|
+
if !old_config.include?(trimmed_value)
|
|
272
|
+
config.build_settings[setting_name] = "#{old_config.strip()} #{trimmed_value}".strip()
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
def self.remove_value_from_setting_if_present(config, setting_name, value)
|
|
277
|
+
old_config = config.build_settings[setting_name]
|
|
278
|
+
if old_config.is_a?(Array)
|
|
279
|
+
old_config = old_config.join(" ")
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
trimmed_value = value.strip()
|
|
283
|
+
if old_config.include?(trimmed_value)
|
|
284
|
+
new_config = old_config.gsub(trimmed_value, "")
|
|
285
|
+
config.build_settings[setting_name] = new_config.strip()
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
def self.is_using_xcode15_or_greter(xcodebuild_manager: Xcodebuild)
|
|
290
|
+
xcodebuild_version = xcodebuild_manager.version
|
|
291
|
+
|
|
292
|
+
# The output of xcodebuild -version is something like
|
|
293
|
+
# Xcode 15.0
|
|
294
|
+
# or
|
|
295
|
+
# Xcode 14.3.1
|
|
296
|
+
# We want to capture the version digits
|
|
297
|
+
regex = /(\d+)\.(\d+)(?:\.(\d+))?/
|
|
298
|
+
if match_data = xcodebuild_version.match(regex)
|
|
299
|
+
major = match_data[1].to_i
|
|
300
|
+
return major >= 15
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
return false
|
|
304
|
+
end
|
|
200
305
|
end
|
|
@@ -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'
|
|
@@ -23,11 +24,11 @@ $FOLLY_VERSION = '2021.07.22.00'
|
|
|
23
24
|
|
|
24
25
|
$START_TIME = Time.now.to_i
|
|
25
26
|
|
|
26
|
-
# This function returns the min
|
|
27
|
-
# By using this function, you won't have to
|
|
27
|
+
# This function returns the min supported OS versions supported by React Native
|
|
28
|
+
# By using this function, you won't have to manually change your Podfile
|
|
28
29
|
# when we change the minimum version supported by the framework.
|
|
29
30
|
def min_ios_version_supported
|
|
30
|
-
return
|
|
31
|
+
return Helpers::Constants.min_ios_version_supported
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
# This function prepares the project for React Native, before processing
|
|
@@ -224,11 +225,13 @@ def react_native_post_install(installer, react_native_path = "../node_modules/re
|
|
|
224
225
|
ReactNativePodsUtils.fix_library_search_paths(installer)
|
|
225
226
|
ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path)
|
|
226
227
|
ReactNativePodsUtils.apply_xcode_15_patch(installer)
|
|
228
|
+
ReactNativePodsUtils.updateIphoneOSDeploymentTarget(installer)
|
|
227
229
|
|
|
228
230
|
NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
|
|
229
231
|
is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == "1"
|
|
230
232
|
NewArchitectureHelper.modify_flags_for_new_architecture(installer, is_new_arch_enabled)
|
|
231
233
|
|
|
234
|
+
|
|
232
235
|
Pod::UI.puts "Pod install took #{Time.now.to_i - $START_TIME} [s] to run".green
|
|
233
236
|
end
|
|
234
237
|
|
|
@@ -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
|
|
Binary file
|
package/template/Gemfile
CHANGED