react-native 0.72.1 → 0.72.2
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/Libraries/LinkingIOS/React-RCTLinking.podspec +4 -1
- package/Libraries/Network/React-RCTNetwork.podspec +5 -1
- package/Libraries/Settings/React-RCTSettings.podspec +4 -1
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +1 -1
- package/Libraries/Vibration/React-RCTVibration.podspec +3 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +2 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/hermes-engine/build.gradle +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/FrameBasedAnimationDriver.java +14 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/RequestBodyUtil.java +16 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp +15 -11
- package/ReactCommon/React-Fabric.podspec +3 -2
- package/ReactCommon/React-rncore.podspec +12 -0
- package/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/cxxreact/CMakeLists.txt +2 -1
- package/ReactCommon/cxxreact/Instance.cpp +25 -19
- package/ReactCommon/cxxreact/React-cxxreact.podspec +2 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/hermes/inspector/CMakeLists.txt +8 -0
- package/ReactCommon/jsi/React-jsi.podspec +2 -1
- package/ReactCommon/react/config/ReactNativeConfig.cpp +0 -3
- package/ReactCommon/react/debug/React-debug.podspec +3 -2
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -1
- package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +4 -0
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +4 -5
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +4 -2
- package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +1 -1
- package/ReactCommon/react/utils/React-utils.podspec +4 -4
- package/package.json +6 -6
- package/scripts/react-native-xcode.sh +1 -1
- package/scripts/react_native_pods.rb +1 -1
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/package.json +3 -4
|
@@ -28,7 +28,10 @@ header_search_paths = [
|
|
|
28
28
|
if ENV["USE_FRAMEWORKS"]
|
|
29
29
|
header_search_paths = header_search_paths.concat([
|
|
30
30
|
"\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"",
|
|
31
|
-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\""
|
|
31
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"",
|
|
32
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers/build/generated/ios\"",
|
|
33
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"",
|
|
34
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\""
|
|
32
35
|
])
|
|
33
36
|
end
|
|
34
37
|
|
|
@@ -28,7 +28,11 @@ header_search_paths = [
|
|
|
28
28
|
if ENV["USE_FRAMEWORKS"]
|
|
29
29
|
header_search_paths = header_search_paths.concat([
|
|
30
30
|
"\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"",
|
|
31
|
-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\""
|
|
31
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"",
|
|
32
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers/build/generated/ios\"",
|
|
33
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"",
|
|
34
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"",
|
|
35
|
+
|
|
32
36
|
])
|
|
33
37
|
end
|
|
34
38
|
|
|
@@ -28,7 +28,10 @@ header_search_paths = [
|
|
|
28
28
|
if ENV["USE_FRAMEWORKS"]
|
|
29
29
|
header_search_paths = header_search_paths.concat([
|
|
30
30
|
"\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"",
|
|
31
|
-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\""
|
|
31
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"",
|
|
32
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers/build/generated/ios\"",
|
|
33
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"",
|
|
34
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"",
|
|
32
35
|
])
|
|
33
36
|
end
|
|
34
37
|
|
|
@@ -256,7 +256,7 @@ static void *TextFieldSelectionObservingContext = &TextFieldSelectionObservingCo
|
|
|
256
256
|
|
|
257
257
|
- (void)textViewDidChange:(__unused UITextView *)textView
|
|
258
258
|
{
|
|
259
|
-
if (_ignoreNextTextInputCall) {
|
|
259
|
+
if (_ignoreNextTextInputCall && [_lastStringStateWasUpdatedWith isEqual:_backedTextInputView.attributedText]) {
|
|
260
260
|
_ignoreNextTextInputCall = NO;
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
@@ -28,7 +28,9 @@ header_search_paths = [
|
|
|
28
28
|
if ENV["USE_FRAMEWORKS"]
|
|
29
29
|
header_search_paths = header_search_paths.concat([
|
|
30
30
|
"\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"",
|
|
31
|
-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\""
|
|
31
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"",
|
|
32
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"",
|
|
33
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\""
|
|
32
34
|
])
|
|
33
35
|
end
|
|
34
36
|
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
- (void)dealloc
|
|
26
26
|
{
|
|
27
|
+
[_coordinator removeViewFromRegistryWithTag:_tag];
|
|
27
28
|
[_paperView removeFromSuperview];
|
|
28
29
|
[_coordinator removeObserveForTag:_tag];
|
|
29
30
|
}
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
weakSelf.eventInterceptor(eventName, event);
|
|
40
41
|
}
|
|
41
42
|
}];
|
|
43
|
+
[_coordinator addViewToRegistry:_paperView withTag:_tag];
|
|
42
44
|
}
|
|
43
45
|
return _paperView;
|
|
44
46
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/animated/FrameBasedAnimationDriver.java
CHANGED
|
@@ -7,9 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.animated;
|
|
9
9
|
|
|
10
|
+
import com.facebook.common.logging.FLog;
|
|
10
11
|
import com.facebook.react.bridge.ReadableArray;
|
|
11
12
|
import com.facebook.react.bridge.ReadableMap;
|
|
12
13
|
import com.facebook.react.bridge.ReadableType;
|
|
14
|
+
import com.facebook.react.common.ReactConstants;
|
|
15
|
+
import com.facebook.react.common.build.ReactBuildConfig;
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* Implementation of {@link AnimationDriver} which provides a support for simple time-based
|
|
@@ -70,7 +73,17 @@ class FrameBasedAnimationDriver extends AnimationDriver {
|
|
|
70
73
|
long timeFromStartMillis = (frameTimeNanos - mStartFrameTimeNanos) / 1000000;
|
|
71
74
|
int frameIndex = (int) Math.round(timeFromStartMillis / FRAME_TIME_MILLIS);
|
|
72
75
|
if (frameIndex < 0) {
|
|
73
|
-
|
|
76
|
+
String message =
|
|
77
|
+
"Calculated frame index should never be lower than 0. Called with frameTimeNanos "
|
|
78
|
+
+ frameTimeNanos
|
|
79
|
+
+ " and mStartFrameTimeNanos "
|
|
80
|
+
+ mStartFrameTimeNanos;
|
|
81
|
+
if (ReactBuildConfig.DEBUG) {
|
|
82
|
+
throw new IllegalStateException(message);
|
|
83
|
+
} else {
|
|
84
|
+
FLog.w(ReactConstants.TAG, message);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
74
87
|
} else if (mHasFinished) {
|
|
75
88
|
// nothing to do here
|
|
76
89
|
return;
|
|
@@ -29,7 +29,6 @@ import java.nio.channels.ReadableByteChannel;
|
|
|
29
29
|
import java.util.zip.GZIPOutputStream;
|
|
30
30
|
import okhttp3.MediaType;
|
|
31
31
|
import okhttp3.RequestBody;
|
|
32
|
-
import okhttp3.internal.Util;
|
|
33
32
|
import okio.BufferedSink;
|
|
34
33
|
import okio.ByteString;
|
|
35
34
|
import okio.Okio;
|
|
@@ -122,6 +121,21 @@ import okio.Source;
|
|
|
122
121
|
return RequestBody.create(mediaType, gzipByteArrayOutputStream.toByteArray());
|
|
123
122
|
}
|
|
124
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Reference:
|
|
126
|
+
* https://github.com/square/okhttp/blob/8c8c3dbcfa91e28de2e13975ec414e07f153fde4/okhttp/src/commonMain/kotlin/okhttp3/internal/-UtilCommon.kt#L281-L288
|
|
127
|
+
* Checked exceptions will be ignored
|
|
128
|
+
*/
|
|
129
|
+
private static void closeQuietly(Source source) {
|
|
130
|
+
try {
|
|
131
|
+
source.close();
|
|
132
|
+
} catch (RuntimeException e) {
|
|
133
|
+
throw e;
|
|
134
|
+
} catch (Exception e) {
|
|
135
|
+
// noop.
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
125
139
|
/** Creates a RequestBody from a mediaType and inputStream given. */
|
|
126
140
|
public static RequestBody create(final MediaType mediaType, final InputStream inputStream) {
|
|
127
141
|
return new RequestBody() {
|
|
@@ -146,7 +160,7 @@ import okio.Source;
|
|
|
146
160
|
source = Okio.source(inputStream);
|
|
147
161
|
sink.writeAll(source);
|
|
148
162
|
} finally {
|
|
149
|
-
|
|
163
|
+
closeQuietly(source);
|
|
150
164
|
}
|
|
151
165
|
}
|
|
152
166
|
};
|
|
@@ -418,8 +418,11 @@ CatalystInstanceImpl::getNativeCallInvokerHolder() {
|
|
|
418
418
|
jni::alias_ref<JRuntimeExecutor::javaobject>
|
|
419
419
|
CatalystInstanceImpl::getRuntimeExecutor() {
|
|
420
420
|
if (!runtimeExecutor_) {
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
auto executor = instance_->getRuntimeExecutor();
|
|
422
|
+
if (executor) {
|
|
423
|
+
runtimeExecutor_ =
|
|
424
|
+
jni::make_global(JRuntimeExecutor::newObjectCxxArgs(executor));
|
|
425
|
+
}
|
|
423
426
|
}
|
|
424
427
|
return runtimeExecutor_;
|
|
425
428
|
}
|
|
@@ -428,15 +431,16 @@ jni::alias_ref<JRuntimeScheduler::javaobject>
|
|
|
428
431
|
CatalystInstanceImpl::getRuntimeScheduler() {
|
|
429
432
|
if (!runtimeScheduler_) {
|
|
430
433
|
auto runtimeExecutor = instance_->getRuntimeExecutor();
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
434
|
+
if (runtimeExecutor) {
|
|
435
|
+
auto runtimeScheduler =
|
|
436
|
+
std::make_shared<RuntimeScheduler>(runtimeExecutor);
|
|
437
|
+
runtimeScheduler_ = jni::make_global(
|
|
438
|
+
JRuntimeScheduler::newObjectCxxArgs(runtimeScheduler));
|
|
439
|
+
runtimeExecutor([scheduler =
|
|
440
|
+
std::move(runtimeScheduler)](jsi::Runtime &runtime) {
|
|
441
|
+
RuntimeSchedulerBinding::createAndInstallIfNeeded(runtime, scheduler);
|
|
442
|
+
});
|
|
443
|
+
}
|
|
440
444
|
}
|
|
441
445
|
|
|
442
446
|
return runtimeScheduler_;
|
|
@@ -33,10 +33,11 @@ Pod::Spec.new do |s|
|
|
|
33
33
|
s.source = source
|
|
34
34
|
s.source_files = "dummyFile.cpp"
|
|
35
35
|
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
|
|
36
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
36
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
37
|
+
"DEFINES_MODULE" => "YES" }
|
|
37
38
|
|
|
38
39
|
if ENV['USE_FRAMEWORKS']
|
|
39
|
-
s.header_mappings_dir = './'
|
|
40
|
+
s.header_mappings_dir = File.absolute_path('./')
|
|
40
41
|
s.module_name = 'React_Fabric'
|
|
41
42
|
end
|
|
42
43
|
|
|
@@ -26,6 +26,17 @@ react_native_dependency_path = ENV['REACT_NATIVE_PATH']
|
|
|
26
26
|
# Relative path to react native from current podspec
|
|
27
27
|
react_native_sources_path = '..'
|
|
28
28
|
|
|
29
|
+
header_search_paths = [
|
|
30
|
+
"\"$(PODS_TARGET_SRCROOT)\"",
|
|
31
|
+
"\"$(PODS_TARGET_SRCROOT)/ReactCommon\"",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
if ENV["USE_FRAMEWORKS"]
|
|
35
|
+
header_search_paths = header_search_paths.concat([
|
|
36
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"",
|
|
37
|
+
])
|
|
38
|
+
end
|
|
39
|
+
|
|
29
40
|
Pod::Spec.new do |s|
|
|
30
41
|
s.name = "React-rncore"
|
|
31
42
|
s.version = version
|
|
@@ -37,6 +48,7 @@ Pod::Spec.new do |s|
|
|
|
37
48
|
s.source = source
|
|
38
49
|
s.source_files = "dummyFile.cpp"
|
|
39
50
|
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
|
|
51
|
+
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
|
|
40
52
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17" }
|
|
41
53
|
|
|
42
54
|
|
|
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
|
|
|
37
37
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
38
38
|
"GCC_WARN_PEDANTIC" => "YES" }
|
|
39
39
|
if ENV['USE_FRAMEWORKS']
|
|
40
|
-
s.header_mappings_dir =
|
|
40
|
+
s.header_mappings_dir = File.absolute_path("./")
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
# TODO (T48588859): Restructure this target to align with dir structure: "react/nativemodule/..."
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
#include <cxxreact/JSIndexedRAMBundle.h>
|
|
22
22
|
#include <folly/MoveWrapper.h>
|
|
23
23
|
#include <folly/json.h>
|
|
24
|
+
#include <react/debug/react_native_assert.h>
|
|
24
25
|
|
|
25
26
|
#include <glog/logging.h>
|
|
26
27
|
|
|
@@ -212,26 +213,31 @@ std::shared_ptr<CallInvoker> Instance::getJSCallInvoker() {
|
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
RuntimeExecutor Instance::getRuntimeExecutor() {
|
|
215
|
-
|
|
216
|
+
// HACK: RuntimeExecutor is not compatible with non-JSIExecutor, we return
|
|
217
|
+
// a null callback, which the caller should handle.
|
|
218
|
+
if (!getJavaScriptContext()) {
|
|
219
|
+
return nullptr;
|
|
220
|
+
}
|
|
216
221
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
222
|
+
std::weak_ptr<NativeToJsBridge> weakNativeToJsBridge = nativeToJsBridge_;
|
|
223
|
+
return [weakNativeToJsBridge](
|
|
224
|
+
std::function<void(jsi::Runtime & runtime)> &&callback) {
|
|
225
|
+
if (auto strongNativeToJsBridge = weakNativeToJsBridge.lock()) {
|
|
226
|
+
strongNativeToJsBridge->runOnExecutorQueue(
|
|
227
|
+
[callback = std::move(callback)](JSExecutor *executor) {
|
|
228
|
+
// Assumes the underlying executor is a JSIExecutor
|
|
229
|
+
jsi::Runtime *runtime =
|
|
230
|
+
(jsi::Runtime *)executor->getJavaScriptContext();
|
|
231
|
+
try {
|
|
232
|
+
react_native_assert(runtime != nullptr);
|
|
233
|
+
callback(*runtime);
|
|
234
|
+
executor->flush();
|
|
235
|
+
} catch (jsi::JSError &originalError) {
|
|
236
|
+
handleJSError(*runtime, originalError, true);
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
};
|
|
235
241
|
}
|
|
236
242
|
|
|
237
243
|
std::shared_ptr<CallInvoker> Instance::getDecoratedNativeCallInvoker(
|
|
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
|
|
|
33
33
|
s.source_files = "*.{cpp,h}"
|
|
34
34
|
s.exclude_files = "SampleCxxModule.*"
|
|
35
35
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
36
|
-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers\"",
|
|
36
|
+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\"",
|
|
37
37
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17" }
|
|
38
38
|
s.header_dir = "cxxreact"
|
|
39
39
|
|
|
@@ -47,6 +47,7 @@ Pod::Spec.new do |s|
|
|
|
47
47
|
s.dependency "React-perflogger", version
|
|
48
48
|
s.dependency "React-jsi", version
|
|
49
49
|
s.dependency "React-logger", version
|
|
50
|
+
s.dependency "React-debug", version
|
|
50
51
|
|
|
51
52
|
if ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == "1"
|
|
52
53
|
s.dependency 'hermes-engine'
|
|
@@ -20,6 +20,14 @@ target_compile_options(
|
|
|
20
20
|
-fexceptions
|
|
21
21
|
)
|
|
22
22
|
|
|
23
|
+
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
|
24
|
+
target_compile_options(
|
|
25
|
+
hermes_inspector
|
|
26
|
+
PRIVATE
|
|
27
|
+
-DHERMES_ENABLE_DEBUGGER=1
|
|
28
|
+
)
|
|
29
|
+
endif()
|
|
30
|
+
|
|
23
31
|
target_include_directories(hermes_inspector PUBLIC ${REACT_COMMON_DIR})
|
|
24
32
|
target_link_libraries(hermes_inspector
|
|
25
33
|
jsinspector
|
|
@@ -36,7 +36,8 @@ Pod::Spec.new do |s|
|
|
|
36
36
|
|
|
37
37
|
s.header_dir = "jsi"
|
|
38
38
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
39
|
-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\""
|
|
39
|
+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"",
|
|
40
|
+
"DEFINES_MODULE" => "YES" }
|
|
40
41
|
|
|
41
42
|
s.dependency "boost", "1.76.0"
|
|
42
43
|
s.dependency "DoubleConversion"
|
|
@@ -24,9 +24,6 @@ bool EmptyReactNativeConfig::getBool(const std::string ¶m) const {
|
|
|
24
24
|
if (param == "react_fabric:enabled_layout_animations_ios") {
|
|
25
25
|
return true;
|
|
26
26
|
}
|
|
27
|
-
if (param == "react_fabric:enable_nstextstorage_caching") {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
27
|
return false;
|
|
31
28
|
}
|
|
32
29
|
|
|
@@ -27,10 +27,11 @@ Pod::Spec.new do |s|
|
|
|
27
27
|
s.source = source
|
|
28
28
|
s.source_files = "**/*.{cpp,h}"
|
|
29
29
|
s.header_dir = "react/debug"
|
|
30
|
-
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
30
|
+
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
31
|
+
"DEFINES_MODULE" => "YES" }
|
|
31
32
|
|
|
32
33
|
if ENV['USE_FRAMEWORKS']
|
|
33
34
|
s.module_name = "React_debug"
|
|
34
|
-
s.header_mappings_dir = "../.."
|
|
35
|
+
s.header_mappings_dir = File.absolute_path("../..")
|
|
35
36
|
end
|
|
36
37
|
end
|
|
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
|
|
|
37
37
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
38
38
|
"GCC_WARN_PEDANTIC" => "YES" }
|
|
39
39
|
if ENV['USE_FRAMEWORKS']
|
|
40
|
-
s.header_mappings_dir = './'
|
|
40
|
+
s.header_mappings_dir = File.absolute_path('./')
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
s.source_files = "ReactCommon/**/*.{mm,cpp,h}"
|
|
@@ -38,6 +38,10 @@ typedef void (^InterceptorBlock)(std::string eventName, folly::dynamic event);
|
|
|
38
38
|
reactTag:(NSInteger)tag
|
|
39
39
|
paperView:(UIView *)paperView;
|
|
40
40
|
|
|
41
|
+
- (void)removeViewFromRegistryWithTag:(NSInteger)tag;
|
|
42
|
+
|
|
43
|
+
- (void)addViewToRegistry:(UIView *)view withTag:(NSInteger)tag;
|
|
44
|
+
|
|
41
45
|
@end
|
|
42
46
|
|
|
43
47
|
NS_ASSUME_NONNULL_END
|
|
@@ -131,22 +131,19 @@ using namespace facebook::react;
|
|
|
131
131
|
NSArray *newArgs = [@[ [NSNumber numberWithInteger:tag] ] arrayByAddingObjectsFromArray:args];
|
|
132
132
|
|
|
133
133
|
if (_bridge) {
|
|
134
|
-
[self _addViewToRegistry:paperView withTag:tag];
|
|
135
134
|
[_bridge.batchedBridge
|
|
136
135
|
dispatchBlock:^{
|
|
137
136
|
[method invokeWithBridge:self->_bridge module:self->_componentData.manager arguments:newArgs];
|
|
138
137
|
[self->_bridge.uiManager setNeedsLayout];
|
|
139
138
|
}
|
|
140
139
|
queue:RCTGetUIManagerQueue()];
|
|
141
|
-
[self _removeViewFromRegistryWithTag:tag];
|
|
142
140
|
} else {
|
|
143
141
|
// TODO T86826778 - Figure out which queue this should be dispatched to.
|
|
144
142
|
[method invokeWithBridge:nil module:self->_componentData.manager arguments:newArgs];
|
|
145
143
|
}
|
|
146
144
|
}
|
|
147
145
|
|
|
148
|
-
|
|
149
|
-
- (void)_addViewToRegistry:(UIView *)view withTag:(NSInteger)tag
|
|
146
|
+
- (void)addViewToRegistry:(UIView *)view withTag:(NSInteger)tag
|
|
150
147
|
{
|
|
151
148
|
[self _addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
152
149
|
if ([viewRegistry objectForKey:@(tag)] != NULL) {
|
|
@@ -158,7 +155,7 @@ using namespace facebook::react;
|
|
|
158
155
|
}];
|
|
159
156
|
}
|
|
160
157
|
|
|
161
|
-
- (void)
|
|
158
|
+
- (void)removeViewFromRegistryWithTag:(NSInteger)tag
|
|
162
159
|
{
|
|
163
160
|
[self _addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
164
161
|
if ([viewRegistry objectForKey:@(tag)] == NULL) {
|
|
@@ -171,6 +168,8 @@ using namespace facebook::react;
|
|
|
171
168
|
}];
|
|
172
169
|
}
|
|
173
170
|
|
|
171
|
+
#pragma mark - Private
|
|
172
|
+
|
|
174
173
|
- (void)_addUIBlock:(RCTViewManagerUIBlock)block
|
|
175
174
|
{
|
|
176
175
|
__weak __typeof__(self) weakSelf = self;
|
|
@@ -45,11 +45,13 @@ Pod::Spec.new do |s|
|
|
|
45
45
|
|
|
46
46
|
if ENV['USE_FRAMEWORKS']
|
|
47
47
|
s.module_name = "React_graphics"
|
|
48
|
-
s.header_mappings_dir =
|
|
48
|
+
s.header_mappings_dir = File.absolute_path("../../..")
|
|
49
49
|
header_search_paths = header_search_paths + ["\"$(PODS_TARGET_SRCROOT)/platform/ios\""]
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
|
52
|
+
s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
|
53
|
+
"HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
|
|
54
|
+
"DEFINES_MODULE" => "YES" }
|
|
53
55
|
|
|
54
56
|
s.dependency "glog"
|
|
55
57
|
s.dependency "RCT-Folly/Fabric", folly_version
|
|
@@ -42,7 +42,7 @@ Pod::Spec.new do |s|
|
|
|
42
42
|
|
|
43
43
|
if ENV['USE_FRAMEWORKS']
|
|
44
44
|
s.module_name = "React_ImageManager"
|
|
45
|
-
s.header_mappings_dir = "./"
|
|
45
|
+
s.header_mappings_dir = File.absolute_path("./")
|
|
46
46
|
header_search_paths = header_search_paths + [
|
|
47
47
|
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"",
|
|
48
48
|
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
@@ -42,13 +42,13 @@ Pod::Spec.new do |s|
|
|
|
42
42
|
s.compiler_flags = folly_compiler_flags
|
|
43
43
|
s.header_dir = "react/utils"
|
|
44
44
|
s.exclude_files = "tests"
|
|
45
|
-
s.pod_target_xcconfig = {
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
46
|
+
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
|
|
47
|
+
"DEFINES_MODULE" => "YES" }
|
|
48
48
|
|
|
49
49
|
if ENV['USE_FRAMEWORKS']
|
|
50
50
|
s.module_name = "React_utils"
|
|
51
|
-
s.header_mappings_dir = "../.."
|
|
51
|
+
s.header_mappings_dir = File.absolute_path("../..")
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
s.dependency "RCT-Folly", folly_version
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.72.
|
|
3
|
+
"version": "0.72.2",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "A framework for building native apps using React",
|
|
6
6
|
"license": "MIT",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
82
|
-
"@react-native-community/cli": "11.3.
|
|
83
|
-
"@react-native-community/cli-platform-android": "11.3.
|
|
84
|
-
"@react-native-community/cli-platform-ios": "11.3.
|
|
82
|
+
"@react-native-community/cli": "11.3.5",
|
|
83
|
+
"@react-native-community/cli-platform-android": "11.3.5",
|
|
84
|
+
"@react-native-community/cli-platform-ios": "11.3.5",
|
|
85
85
|
"@react-native/assets-registry": "^0.72.0",
|
|
86
86
|
"@react-native/codegen": "^0.72.6",
|
|
87
87
|
"@react-native/gradle-plugin": "^0.72.11",
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
"jest-environment-node": "^29.2.1",
|
|
99
99
|
"jsc-android": "^250231.0.0",
|
|
100
100
|
"memoize-one": "^5.0.0",
|
|
101
|
-
"metro-runtime": "0.76.
|
|
102
|
-
"metro-source-map": "0.76.
|
|
101
|
+
"metro-runtime": "0.76.7",
|
|
102
|
+
"metro-source-map": "0.76.7",
|
|
103
103
|
"mkdirp": "^0.5.1",
|
|
104
104
|
"nullthrows": "^1.1.1",
|
|
105
105
|
"pretty-format": "^26.5.2",
|
|
@@ -176,7 +176,7 @@ else
|
|
|
176
176
|
if [[ $EMIT_SOURCEMAP == true ]]; then
|
|
177
177
|
EXTRA_COMPILER_ARGS="$EXTRA_COMPILER_ARGS -output-source-map"
|
|
178
178
|
fi
|
|
179
|
-
"$HERMES_CLI_PATH" -emit-binary -max-diagnostic-width=80
|
|
179
|
+
"$HERMES_CLI_PATH" -emit-binary -max-diagnostic-width=80 $EXTRA_COMPILER_ARGS -out "$DEST/main.jsbundle" "$BUNDLE_FILE"
|
|
180
180
|
if [[ $EMIT_SOURCEMAP == true ]]; then
|
|
181
181
|
HBC_SOURCEMAP_FILE="$DEST/main.jsbundle.map"
|
|
182
182
|
"$NODE_BINARY" "$COMPOSE_SOURCEMAP_PATH" "$PACKAGER_SOURCEMAP_FILE" "$HBC_SOURCEMAP_FILE" -o "$SOURCEMAP_FILE"
|
|
@@ -139,7 +139,7 @@ def use_react_native! (
|
|
|
139
139
|
pod 'Yoga', :path => "#{prefix}/ReactCommon/yoga", :modular_headers => true
|
|
140
140
|
|
|
141
141
|
pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec"
|
|
142
|
-
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec"
|
|
142
|
+
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec", :modular_headers => true
|
|
143
143
|
pod 'boost', :podspec => "#{prefix}/third-party-podspecs/boost.podspec"
|
|
144
144
|
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true
|
|
145
145
|
|
|
Binary file
|
|
Binary file
|
package/template/package.json
CHANGED
|
@@ -11,22 +11,21 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"react": "18.2.0",
|
|
14
|
-
"react-native": "0.72.
|
|
14
|
+
"react-native": "0.72.2"
|
|
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.
|
|
21
|
+
"@react-native/metro-config": "^0.72.9",
|
|
22
22
|
"@tsconfig/react-native": "^3.0.0",
|
|
23
|
-
"@types/metro-config": "^0.76.3",
|
|
24
23
|
"@types/react": "^18.0.24",
|
|
25
24
|
"@types/react-test-renderer": "^18.0.0",
|
|
26
25
|
"babel-jest": "^29.2.1",
|
|
27
26
|
"eslint": "^8.19.0",
|
|
28
27
|
"jest": "^29.2.1",
|
|
29
|
-
"metro-react-native-babel-preset": "0.76.
|
|
28
|
+
"metro-react-native-babel-preset": "0.76.7",
|
|
30
29
|
"prettier": "^2.4.1",
|
|
31
30
|
"react-test-renderer": "18.2.0",
|
|
32
31
|
"typescript": "4.8.4"
|