react-native-tvos 0.74.0-0rc0 → 0.74.0-0rc1

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 (42) hide show
  1. package/Libraries/Core/ReactNativeVersion.js +1 -1
  2. package/Libraries/ReactNative/AppContainer-dev.js +21 -2
  3. package/React/Base/RCTBridge+Inspector.h +30 -0
  4. package/React/Base/RCTBridge+Private.h +0 -20
  5. package/React/Base/RCTBridge.mm +1 -0
  6. package/React/Base/RCTVersion.m +1 -1
  7. package/React/CoreModules/RCTDevSettings.mm +1 -0
  8. package/React/CxxBridge/RCTCxxBridge.mm +1 -0
  9. package/ReactAndroid/api/ReactAndroid.api +24 -1
  10. package/ReactAndroid/build.gradle.kts +18 -6
  11. package/ReactAndroid/gradle.properties +1 -1
  12. package/ReactAndroid/hermes-engine/build.gradle.kts +2 -0
  13. package/ReactAndroid/src/main/java/com/facebook/react/DebugCorePackage.java +1 -1
  14. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +4 -0
  15. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +9 -35
  16. package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +97 -9
  17. package/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt +8 -0
  18. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +2 -1
  19. package/ReactAndroid/src/main/java/com/facebook/react/fabric/internal/interop/InteropUiBlockListener.kt +8 -2
  20. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  21. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +64 -0
  22. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.java +4 -0
  23. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.java +17 -1
  24. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +1 -1
  25. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  26. package/ReactCommon/react/runtime/hermes/HermesInstance.cpp +0 -1
  27. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +1 -0
  28. package/package.json +21 -13
  29. package/scripts/cocoapods/helpers.rb +4 -0
  30. package/scripts/cocoapods/utils.rb +26 -6
  31. package/scripts/react_native_pods.rb +2 -0
  32. package/scripts/xcode/ccache-clang++.sh +14 -0
  33. package/scripts/xcode/ccache-clang.sh +14 -0
  34. package/scripts/xcode/ccache.conf +11 -0
  35. package/sdks/hermes-engine/utils/build-apple-framework.sh +2 -0
  36. package/sdks/hermes-engine/utils/build-ios-framework.sh +2 -0
  37. package/sdks/hermes-engine/utils/build-mac-framework.sh +2 -0
  38. package/sdks/hermesc/osx-bin/hermes +0 -0
  39. package/sdks/hermesc/osx-bin/hermesc +0 -0
  40. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  41. package/template/package.json +5 -5
  42. package/ReactAndroid/src/main/java/com/facebook/react/common/build/ReactBuildConfig.java +0 -23
@@ -17,7 +17,7 @@ const version: $ReadOnly<{
17
17
  major: 0,
18
18
  minor: 74,
19
19
  patch: 0,
20
- prerelease: '0rc0',
20
+ prerelease: '0rc1',
21
21
  };
22
22
 
23
23
  module.exports = {version};
@@ -21,7 +21,6 @@ import Platform from '../Utilities/Platform';
21
21
  import DebuggingOverlay from '../Debugging/DebuggingOverlay';
22
22
  import useSubscribeToDebuggingOverlayRegistry from '../Debugging/useSubscribeToDebuggingOverlayRegistry';
23
23
  import RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';
24
- import ReactDevToolsOverlay from '../Inspector/ReactDevToolsOverlay';
25
24
  import LogBoxNotificationContainer from '../LogBox/LogBoxNotificationContainer';
26
25
  import StyleSheet from '../StyleSheet/StyleSheet';
27
26
  import {RootTagContext, createRootTag} from './RootTag';
@@ -65,6 +64,26 @@ const InspectorDeferred = ({
65
64
  );
66
65
  };
67
66
 
67
+ type ReactDevToolsOverlayDeferredProps = {
68
+ inspectedViewRef: InspectedViewRef,
69
+ reactDevToolsAgent: ReactDevToolsAgent,
70
+ };
71
+
72
+ const ReactDevToolsOverlayDeferred = ({
73
+ inspectedViewRef,
74
+ reactDevToolsAgent,
75
+ }: ReactDevToolsOverlayDeferredProps) => {
76
+ const ReactDevToolsOverlay =
77
+ require('../Inspector/ReactDevToolsOverlay').default;
78
+
79
+ return (
80
+ <ReactDevToolsOverlay
81
+ inspectedViewRef={inspectedViewRef}
82
+ reactDevToolsAgent={reactDevToolsAgent}
83
+ />
84
+ );
85
+ };
86
+
68
87
  const AppContainer = ({
69
88
  children,
70
89
  fabric,
@@ -156,7 +175,7 @@ const AppContainer = ({
156
175
  {!Platform.isTV ? <DebuggingOverlay ref={debuggingOverlayRef} /> : null}
157
176
 
158
177
  {reactDevToolsAgent != null && (
159
- <ReactDevToolsOverlay
178
+ <ReactDevToolsOverlayDeferred
160
179
  inspectedViewRef={innerViewRef}
161
180
  reactDevToolsAgent={reactDevToolsAgent}
162
181
  />
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <React/RCTBridge.h>
9
+
10
+ #ifdef __cplusplus
11
+ #import <jsinspector-modern/ReactCdp.h>
12
+ #endif
13
+
14
+ @interface RCTBridge (Inspector)
15
+
16
+ /**
17
+ * The HostTarget for this bridge, if one has been created. Exposed for RCTCxxBridge only.
18
+ */
19
+ @property (nonatomic, assign, readonly)
20
+ #ifdef __cplusplus
21
+ facebook::react::jsinspector_modern::PageTarget *
22
+ #else
23
+ // The inspector infrastructure cannot be used in C or Swift code.
24
+ void *
25
+ #endif
26
+ inspectorTarget;
27
+
28
+ @property (nonatomic, readonly, getter=isInspectable) BOOL inspectable;
29
+
30
+ @end
@@ -6,9 +6,6 @@
6
6
  */
7
7
 
8
8
  #import <React/RCTBridge.h>
9
- #ifdef __cplusplus
10
- #import <jsinspector-modern/ReactCdp.h>
11
- #endif
12
9
 
13
10
  @class RCTModuleRegistry;
14
11
  @class RCTModuleData;
@@ -73,17 +70,6 @@ RCT_EXTERN void RCTRegisterModule(Class);
73
70
  */
74
71
  @property (nonatomic, strong, readonly) RCTModuleRegistry *moduleRegistry;
75
72
 
76
- /**
77
- * The page target for this bridge, if one has been created. Exposed for RCTCxxBridge only.
78
- */
79
- @property (nonatomic, assign, readonly)
80
- #ifdef __cplusplus
81
- facebook::react::jsinspector_modern::PageTarget *
82
- #else
83
- // The inspector infrastructure cannot be used in C code.
84
- void *
85
- #endif
86
- inspectorTarget;
87
73
  @end
88
74
 
89
75
  @interface RCTBridge (RCTCxxBridge)
@@ -155,12 +141,6 @@ RCT_EXTERN void RCTRegisterModule(Class);
155
141
 
156
142
  @end
157
143
 
158
- @interface RCTBridge (Inspector)
159
-
160
- @property (nonatomic, readonly, getter=isInspectable) BOOL inspectable;
161
-
162
- @end
163
-
164
144
  @interface RCTCxxBridge : RCTBridge
165
145
 
166
146
  // TODO(cjhopman): this seems unsafe unless we require that it is only called on the main js queue.
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  #import "RCTBridge.h"
9
+ #import "RCTBridge+Inspector.h"
9
10
  #import "RCTBridge+Private.h"
10
11
 
11
12
  #import <objc/runtime.h>
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(74),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"0rc0",
27
+ RCTVersionPrerelease: @"0rc1",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -10,6 +10,7 @@
10
10
  #import <objc/runtime.h>
11
11
 
12
12
  #import <FBReactNativeSpec/FBReactNativeSpec.h>
13
+ #import <React/RCTBridge+Inspector.h>
13
14
  #import <React/RCTBridge+Private.h>
14
15
  #import <React/RCTBridgeModule.h>
15
16
  #import <React/RCTConstants.h>
@@ -9,6 +9,7 @@
9
9
  #include <future>
10
10
 
11
11
  #import <React/RCTAssert.h>
12
+ #import <React/RCTBridge+Inspector.h>
12
13
  #import <React/RCTBridge+Private.h>
13
14
  #import <React/RCTBridge.h>
14
15
  #import <React/RCTBridgeMethod.h>
@@ -29,6 +29,15 @@ public class com/facebook/react/CoreModulesPackage$$ReactModuleInfoProvider : co
29
29
  public fun getReactModuleInfos ()Ljava/util/Map;
30
30
  }
31
31
 
32
+ public class com/facebook/react/DebugCorePackage : com/facebook/react/TurboReactPackage, com/facebook/react/ViewManagerOnDemandReactPackage {
33
+ public fun <init> ()V
34
+ public fun createViewManager (Lcom/facebook/react/bridge/ReactApplicationContext;Ljava/lang/String;)Lcom/facebook/react/uimanager/ViewManager;
35
+ public fun getModule (Ljava/lang/String;Lcom/facebook/react/bridge/ReactApplicationContext;)Lcom/facebook/react/bridge/NativeModule;
36
+ public fun getReactModuleInfoProvider ()Lcom/facebook/react/module/model/ReactModuleInfoProvider;
37
+ public fun getViewManagerNames (Lcom/facebook/react/bridge/ReactApplicationContext;)Ljava/util/Collection;
38
+ public fun getViewManagers (Lcom/facebook/react/bridge/ReactApplicationContext;)Ljava/util/List;
39
+ }
40
+
32
41
  public class com/facebook/react/DebugCorePackage$$ReactModuleInfoProvider : com/facebook/react/module/model/ReactModuleInfoProvider {
33
42
  public fun <init> ()V
34
43
  public fun getReactModuleInfos ()Ljava/util/Map;
@@ -83,6 +92,7 @@ public abstract class com/facebook/react/ReactActivity : androidx/appcompat/app/
83
92
  protected fun <init> ()V
84
93
  protected fun createReactActivityDelegate ()Lcom/facebook/react/ReactActivityDelegate;
85
94
  protected fun getMainComponentName ()Ljava/lang/String;
95
+ public fun getReactDelegate ()V
86
96
  protected final fun getReactInstanceManager ()Lcom/facebook/react/ReactInstanceManager;
87
97
  protected final fun getReactNativeHost ()Lcom/facebook/react/ReactNativeHost;
88
98
  public fun invokeDefaultOnBackPressed ()V
@@ -113,6 +123,7 @@ public class com/facebook/react/ReactActivityDelegate {
113
123
  protected fun getLaunchOptions ()Landroid/os/Bundle;
114
124
  public fun getMainComponentName ()Ljava/lang/String;
115
125
  protected fun getPlainActivity ()Landroid/app/Activity;
126
+ protected fun getReactDelegate ()Lcom/facebook/react/ReactDelegate;
116
127
  public fun getReactHost ()Lcom/facebook/react/ReactHost;
117
128
  public fun getReactInstanceManager ()Lcom/facebook/react/ReactInstanceManager;
118
129
  protected fun getReactNativeHost ()Lcom/facebook/react/ReactNativeHost;
@@ -151,9 +162,15 @@ public class com/facebook/react/ReactDelegate {
151
162
  public fun loadApp (Ljava/lang/String;)V
152
163
  public fun onActivityResult (IILandroid/content/Intent;Z)V
153
164
  public fun onBackPressed ()Z
165
+ public fun onConfigurationChanged (Landroid/content/res/Configuration;)V
154
166
  public fun onHostDestroy ()V
155
167
  public fun onHostPause ()V
156
168
  public fun onHostResume ()V
169
+ public fun onKeyDown (ILandroid/view/KeyEvent;)Z
170
+ public fun onKeyLongPress (I)Z
171
+ public fun onNewIntent (Landroid/content/Intent;)Z
172
+ public fun onWindowFocusChanged (Z)V
173
+ public fun reload ()V
157
174
  public fun shouldShowDevMenuOrReload (ILandroid/view/KeyEvent;)Z
158
175
  }
159
176
 
@@ -198,12 +215,15 @@ public abstract interface class com/facebook/react/ReactHost {
198
215
  public abstract fun getReactQueueConfiguration ()Lcom/facebook/react/bridge/queue/ReactQueueConfiguration;
199
216
  public abstract fun onActivityResult (Landroid/app/Activity;IILandroid/content/Intent;)V
200
217
  public abstract fun onBackPressed ()Z
218
+ public abstract fun onConfigurationChanged (Landroid/content/Context;)V
201
219
  public abstract fun onHostDestroy ()V
202
220
  public abstract fun onHostDestroy (Landroid/app/Activity;)V
203
221
  public abstract fun onHostPause ()V
204
222
  public abstract fun onHostPause (Landroid/app/Activity;)V
205
223
  public abstract fun onHostResume (Landroid/app/Activity;)V
206
224
  public abstract fun onHostResume (Landroid/app/Activity;Lcom/facebook/react/modules/core/DefaultHardwareBackBtnHandler;)V
225
+ public abstract fun onNewIntent (Landroid/content/Intent;)V
226
+ public abstract fun onWindowFocusChange (Z)V
207
227
  public abstract fun reload (Ljava/lang/String;)Lcom/facebook/react/interfaces/TaskInterface;
208
228
  public abstract fun removeBeforeDestroyListener (Lkotlin/jvm/functions/Function0;)V
209
229
  public abstract fun setJsEngineResolutionAlgorithm (Lcom/facebook/react/JSEngineResolutionAlgorithm;)V
@@ -2516,7 +2536,7 @@ public class com/facebook/react/fabric/FabricSoLoader {
2516
2536
  public static fun staticInit ()V
2517
2537
  }
2518
2538
 
2519
- public class com/facebook/react/fabric/FabricUIManager : com/facebook/react/bridge/LifecycleEventListener, com/facebook/react/bridge/UIManager {
2539
+ public class com/facebook/react/fabric/FabricUIManager : com/facebook/react/bridge/LifecycleEventListener, com/facebook/react/bridge/UIManager, com/facebook/react/fabric/interop/UIBlockViewResolver {
2520
2540
  public static final field ENABLE_FABRIC_LOGS Z
2521
2541
  public static final field ENABLE_FABRIC_PERF_LOGS Z
2522
2542
  public static final field IS_DEVELOPMENT_ENVIRONMENT Z
@@ -3646,12 +3666,15 @@ public class com/facebook/react/runtime/ReactHostImpl : com/facebook/react/React
3646
3666
  public fun getReactQueueConfiguration ()Lcom/facebook/react/bridge/queue/ReactQueueConfiguration;
3647
3667
  public fun onActivityResult (Landroid/app/Activity;IILandroid/content/Intent;)V
3648
3668
  public fun onBackPressed ()Z
3669
+ public fun onConfigurationChanged (Landroid/content/Context;)V
3649
3670
  public fun onHostDestroy ()V
3650
3671
  public fun onHostDestroy (Landroid/app/Activity;)V
3651
3672
  public fun onHostPause ()V
3652
3673
  public fun onHostPause (Landroid/app/Activity;)V
3653
3674
  public fun onHostResume (Landroid/app/Activity;)V
3654
3675
  public fun onHostResume (Landroid/app/Activity;Lcom/facebook/react/modules/core/DefaultHardwareBackBtnHandler;)V
3676
+ public fun onNewIntent (Landroid/content/Intent;)V
3677
+ public fun onWindowFocusChange (Z)V
3655
3678
  public fun reload (Ljava/lang/String;)Lcom/facebook/react/interfaces/TaskInterface;
3656
3679
  public fun removeBeforeDestroyListener (Lkotlin/jvm/functions/Function0;)V
3657
3680
  public fun removeReactInstanceEventListener (Lcom/facebook/react/ReactInstanceEventListener;)V
@@ -129,14 +129,24 @@ val preparePrefab by
129
129
  )),
130
130
  PrefabPreprocessingEntry(
131
131
  "rrc_text",
132
- Pair(
133
- "../ReactCommon/react/renderer/components/text/",
134
- "react/renderer/components/text/")),
132
+ listOf(
133
+ Pair(
134
+ "../ReactCommon/react/renderer/components/text/",
135
+ "react/renderer/components/text/"),
136
+ Pair(
137
+ "../ReactCommon/react/renderer/attributedstring",
138
+ "react/renderer/attributedstring"),
139
+ )),
135
140
  PrefabPreprocessingEntry(
136
141
  "rrc_textinput",
137
- Pair(
138
- "../ReactCommon/react/renderer/components/textinput/",
139
- "react/renderer/components/androidtextinput/")),
142
+ listOf(
143
+ Pair(
144
+ "../ReactCommon/react/renderer/components/textinput/",
145
+ "react/renderer/components/textinput/"),
146
+ Pair(
147
+ "../ReactCommon/react/renderer/components/textinput/platform/android/",
148
+ ""),
149
+ )),
140
150
  PrefabPreprocessingEntry(
141
151
  "rrc_legacyviewmanagerinterop",
142
152
  Pair(
@@ -490,6 +500,8 @@ android {
490
500
  }
491
501
  if (rootProject.hasProperty("ndkVersion") && rootProject.properties["ndkVersion"] != null) {
492
502
  ndkVersion = rootProject.properties["ndkVersion"].toString()
503
+ } else {
504
+ ndkVersion = libs.versions.ndkVersion.get()
493
505
  }
494
506
 
495
507
  compileOptions {
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.74.0-0rc0
1
+ VERSION_NAME=0.74.0-0rc1
2
2
  # react.internal.publishingGroup=com.facebook.react
3
3
  # For TV use this group
4
4
  react.internal.publishingGroup=io.github.react-native-tvos
@@ -194,6 +194,8 @@ android {
194
194
  }
195
195
  if (rootProject.hasProperty("ndkVersion") && rootProject.properties["ndkVersion"] != null) {
196
196
  ndkVersion = rootProject.properties["ndkVersion"].toString()
197
+ } else {
198
+ ndkVersion = libs.versions.ndkVersion.get()
197
199
  }
198
200
 
199
201
  defaultConfig {
@@ -36,7 +36,7 @@ import javax.inject.Provider;
36
36
  JSCHeapCapture.class,
37
37
  })
38
38
  /* package */
39
- class DebugCorePackage extends TurboReactPackage implements ViewManagerOnDemandReactPackage {
39
+ public class DebugCorePackage extends TurboReactPackage implements ViewManagerOnDemandReactPackage {
40
40
  private @Nullable Map<String, ModuleSpec> mViewManagers;
41
41
 
42
42
  public DebugCorePackage() {}
@@ -65,6 +65,10 @@ public abstract class ReactActivity extends AppCompatActivity
65
65
  mDelegate.onDestroy();
66
66
  }
67
67
 
68
+ public void getReactDelegate() {
69
+ mDelegate.getReactDelegate();
70
+ }
71
+
68
72
  @Override
69
73
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
70
74
  super.onActivityResult(requestCode, resultCode, data);
@@ -88,6 +88,10 @@ public class ReactActivityDelegate {
88
88
  return ((ReactApplication) getPlainActivity().getApplication()).getReactHost();
89
89
  }
90
90
 
91
+ protected @Nullable ReactDelegate getReactDelegate() {
92
+ return mReactDelegate;
93
+ }
94
+
91
95
  public ReactInstanceManager getReactInstanceManager() {
92
96
  return mReactDelegate.getReactInstanceManager();
93
97
  }
@@ -144,15 +148,7 @@ public class ReactActivityDelegate {
144
148
  }
145
149
 
146
150
  public boolean onKeyDown(int keyCode, KeyEvent event) {
147
- if (!ReactFeatureFlags.enableBridgelessArchitecture) {
148
- if (getReactNativeHost().hasInstance()
149
- && getReactNativeHost().getUseDeveloperSupport()
150
- && keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) {
151
- event.startTracking();
152
- return true;
153
- }
154
- }
155
- return false;
151
+ return mReactDelegate.onKeyDown(keyCode, event);
156
152
  }
157
153
 
158
154
  public boolean onKeyUp(int keyCode, KeyEvent event) {
@@ -160,15 +156,7 @@ public class ReactActivityDelegate {
160
156
  }
161
157
 
162
158
  public boolean onKeyLongPress(int keyCode, KeyEvent event) {
163
- if (!ReactFeatureFlags.enableBridgelessArchitecture) {
164
- if (getReactNativeHost().hasInstance()
165
- && getReactNativeHost().getUseDeveloperSupport()
166
- && keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) {
167
- getReactNativeHost().getReactInstanceManager().showDevOptionsDialog();
168
- return true;
169
- }
170
- }
171
- return false;
159
+ return mReactDelegate.onKeyLongPress(keyCode);
172
160
  }
173
161
 
174
162
  public boolean onBackPressed() {
@@ -176,29 +164,15 @@ public class ReactActivityDelegate {
176
164
  }
177
165
 
178
166
  public boolean onNewIntent(Intent intent) {
179
- if (!ReactFeatureFlags.enableBridgelessArchitecture) {
180
- if (getReactNativeHost().hasInstance()) {
181
- getReactNativeHost().getReactInstanceManager().onNewIntent(intent);
182
- return true;
183
- }
184
- }
185
- return false;
167
+ return mReactDelegate.onNewIntent(intent);
186
168
  }
187
169
 
188
170
  public void onWindowFocusChanged(boolean hasFocus) {
189
- if (!ReactFeatureFlags.enableBridgelessArchitecture) {
190
- if (getReactNativeHost().hasInstance()) {
191
- getReactNativeHost().getReactInstanceManager().onWindowFocusChange(hasFocus);
192
- }
193
- }
171
+ mReactDelegate.onWindowFocusChanged(hasFocus);
194
172
  }
195
173
 
196
174
  public void onConfigurationChanged(Configuration newConfig) {
197
- if (!ReactFeatureFlags.enableBridgelessArchitecture) {
198
- if (getReactNativeHost().hasInstance()) {
199
- getReactInstanceManager().onConfigurationChanged(getContext(), newConfig);
200
- }
201
- }
175
+ mReactDelegate.onConfigurationChanged(newConfig);
202
176
  }
203
177
 
204
178
  public void requestPermissions(
@@ -9,12 +9,14 @@ package com.facebook.react;
9
9
 
10
10
  import android.app.Activity;
11
11
  import android.content.Intent;
12
+ import android.content.res.Configuration;
12
13
  import android.os.Bundle;
13
14
  import android.view.KeyEvent;
14
15
  import androidx.annotation.NonNull;
15
16
  import androidx.annotation.Nullable;
16
17
  import com.facebook.infer.annotation.Assertions;
17
18
  import com.facebook.react.config.ReactFeatureFlags;
19
+ import com.facebook.react.devsupport.DisabledDevSupportManager;
18
20
  import com.facebook.react.devsupport.DoubleTapReloadRecognizer;
19
21
  import com.facebook.react.devsupport.interfaces.DevSupportManager;
20
22
  import com.facebook.react.interfaces.fabric.ReactSurface;
@@ -81,6 +83,20 @@ public class ReactDelegate {
81
83
  mReactNativeHost = reactNativeHost;
82
84
  }
83
85
 
86
+ @Nullable
87
+ private DevSupportManager getDevSupportManager() {
88
+ if (ReactFeatureFlags.enableBridgelessArchitecture
89
+ && mReactHost != null
90
+ && mReactHost.getDevSupportManager() != null) {
91
+ return mReactHost.getDevSupportManager();
92
+ } else if (getReactNativeHost().hasInstance()
93
+ && getReactNativeHost().getUseDeveloperSupport()) {
94
+ return getReactNativeHost().getReactInstanceManager().getDevSupportManager();
95
+ } else {
96
+ return null;
97
+ }
98
+ }
99
+
84
100
  public void onHostResume() {
85
101
  if (ReactFeatureFlags.enableBridgelessArchitecture) {
86
102
  if (mActivity instanceof DefaultHardwareBackBtnHandler) {
@@ -137,6 +153,19 @@ public class ReactDelegate {
137
153
  return false;
138
154
  }
139
155
 
156
+ public boolean onNewIntent(Intent intent) {
157
+ if (ReactFeatureFlags.enableBridgelessArchitecture) {
158
+ mReactHost.onNewIntent(intent);
159
+ return true;
160
+ } else {
161
+ if (getReactNativeHost().hasInstance()) {
162
+ getReactNativeHost().getReactInstanceManager().onNewIntent(intent);
163
+ return true;
164
+ }
165
+ }
166
+ return false;
167
+ }
168
+
140
169
  public void onActivityResult(
141
170
  int requestCode, int resultCode, Intent data, boolean shouldForwardToReactInstance) {
142
171
  if (ReactFeatureFlags.enableBridgelessArchitecture) {
@@ -150,6 +179,72 @@ public class ReactDelegate {
150
179
  }
151
180
  }
152
181
 
182
+ public void onWindowFocusChanged(boolean hasFocus) {
183
+ if (ReactFeatureFlags.enableBridgelessArchitecture) {
184
+ mReactHost.onWindowFocusChange(hasFocus);
185
+ } else {
186
+ if (getReactNativeHost().hasInstance()) {
187
+ getReactNativeHost().getReactInstanceManager().onWindowFocusChange(hasFocus);
188
+ }
189
+ }
190
+ }
191
+
192
+ public void onConfigurationChanged(Configuration newConfig) {
193
+ if (ReactFeatureFlags.enableBridgelessArchitecture) {
194
+ mReactHost.onConfigurationChanged(Assertions.assertNotNull(mActivity));
195
+ } else {
196
+ if (getReactNativeHost().hasInstance()) {
197
+ getReactInstanceManager()
198
+ .onConfigurationChanged(Assertions.assertNotNull(mActivity), newConfig);
199
+ }
200
+ }
201
+ }
202
+
203
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
204
+ if (keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD
205
+ && ((ReactFeatureFlags.enableBridgelessArchitecture
206
+ && mReactHost != null
207
+ && mReactHost.getDevSupportManager() != null)
208
+ || (getReactNativeHost().hasInstance()
209
+ && getReactNativeHost().getUseDeveloperSupport()))) {
210
+ event.startTracking();
211
+ return true;
212
+ }
213
+ return false;
214
+ }
215
+
216
+ public boolean onKeyLongPress(int keyCode) {
217
+ if (keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) {
218
+ if (ReactFeatureFlags.enableBridgelessArchitecture
219
+ && mReactHost != null
220
+ && mReactHost.getDevSupportManager() != null) {
221
+ mReactHost.getDevSupportManager().showDevOptionsDialog();
222
+ return true;
223
+ } else {
224
+ if (getReactNativeHost().hasInstance() && getReactNativeHost().getUseDeveloperSupport()) {
225
+ getReactNativeHost().getReactInstanceManager().showDevOptionsDialog();
226
+ return true;
227
+ }
228
+ }
229
+ }
230
+ return false;
231
+ }
232
+
233
+ public void reload() {
234
+ DevSupportManager devSupportManager = getDevSupportManager();
235
+ if (devSupportManager != null) {
236
+ // With Bridgeless enabled, reload in RELEASE mode
237
+ if (devSupportManager instanceof DisabledDevSupportManager
238
+ && ReactFeatureFlags.enableBridgelessArchitecture
239
+ && mReactHost != null) {
240
+ // Do not reload the bundle from JS as there is no bundler running in release mode.
241
+ mReactHost.reload("ReactDelegate.reload()");
242
+ } else {
243
+ devSupportManager.handleReloadJS();
244
+ }
245
+ }
246
+ }
247
+
153
248
  public void loadApp() {
154
249
  loadApp(mMainComponentName);
155
250
  }
@@ -196,15 +291,8 @@ public class ReactDelegate {
196
291
  * application.
197
292
  */
198
293
  public boolean shouldShowDevMenuOrReload(int keyCode, KeyEvent event) {
199
- DevSupportManager devSupportManager = null;
200
- if (ReactFeatureFlags.enableBridgelessArchitecture
201
- && mReactHost != null
202
- && mReactHost.getDevSupportManager() != null) {
203
- devSupportManager = mReactHost.getDevSupportManager();
204
- } else if (getReactNativeHost().hasInstance()
205
- && getReactNativeHost().getUseDeveloperSupport()) {
206
- devSupportManager = getReactNativeHost().getReactInstanceManager().getDevSupportManager();
207
- } else {
294
+ DevSupportManager devSupportManager = getDevSupportManager();
295
+ if (devSupportManager == null) {
208
296
  return false;
209
297
  }
210
298
 
@@ -120,6 +120,14 @@ public interface ReactHost {
120
120
  data: Intent?,
121
121
  )
122
122
 
123
+ /* To be called when focus has changed for the hosting window. */
124
+ public fun onWindowFocusChange(hasFocus: Boolean)
125
+
126
+ /* This method will give JS the opportunity to receive intents via Linking. */
127
+ public fun onNewIntent(intent: Intent)
128
+
129
+ public fun onConfigurationChanged(context: Context)
130
+
123
131
  public fun addBeforeDestroyListener(onBeforeDestroy: () -> Unit)
124
132
 
125
133
  public fun removeBeforeDestroyListener(onBeforeDestroy: () -> Unit)
@@ -57,6 +57,7 @@ import com.facebook.react.fabric.events.EventEmitterWrapper;
57
57
  import com.facebook.react.fabric.events.FabricEventEmitter;
58
58
  import com.facebook.react.fabric.internal.interop.InteropUIBlockListener;
59
59
  import com.facebook.react.fabric.interop.UIBlock;
60
+ import com.facebook.react.fabric.interop.UIBlockViewResolver;
60
61
  import com.facebook.react.fabric.mounting.MountItemDispatcher;
61
62
  import com.facebook.react.fabric.mounting.MountingManager;
62
63
  import com.facebook.react.fabric.mounting.SurfaceMountingManager;
@@ -99,7 +100,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
99
100
  */
100
101
  @SuppressLint("MissingNativeLoadLibrary")
101
102
  @DoNotStripAny
102
- public class FabricUIManager implements UIManager, LifecycleEventListener {
103
+ public class FabricUIManager implements UIManager, LifecycleEventListener, UIBlockViewResolver {
103
104
  public static final String TAG = FabricUIManager.class.getSimpleName();
104
105
 
105
106
  // The IS_DEVELOPMENT_ENVIRONMENT variable is used to log extra data when running fabric in a
@@ -37,6 +37,9 @@ internal class InteropUIBlockListener : UIManagerListener {
37
37
  }
38
38
 
39
39
  override fun willMountItems(uiManager: UIManager) {
40
+ if (beforeUIBlocks.isEmpty()) {
41
+ return
42
+ }
40
43
  beforeUIBlocks.forEach {
41
44
  if (uiManager is UIBlockViewResolver) {
42
45
  it.execute(uiManager)
@@ -46,6 +49,9 @@ internal class InteropUIBlockListener : UIManagerListener {
46
49
  }
47
50
 
48
51
  override fun didMountItems(uiManager: UIManager) {
52
+ if (afterUIBlocks.isEmpty()) {
53
+ return
54
+ }
49
55
  afterUIBlocks.forEach {
50
56
  if (uiManager is UIBlockViewResolver) {
51
57
  it.execute(uiManager)
@@ -54,9 +60,9 @@ internal class InteropUIBlockListener : UIManagerListener {
54
60
  afterUIBlocks.clear()
55
61
  }
56
62
 
57
- override fun willDispatchViewUpdates(uiManager: UIManager) = Unit
63
+ override fun didDispatchMountItems(uiManager: UIManager) = didMountItems(uiManager)
58
64
 
59
- override fun didDispatchMountItems(uiManager: UIManager) = Unit
65
+ override fun willDispatchViewUpdates(uiManager: UIManager) = willMountItems(uiManager)
60
66
 
61
67
  override fun didScheduleMountItems(uiManager: UIManager) = Unit
62
68
  }
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 74,
20
20
  "patch", 0,
21
- "prerelease", "0rc0");
21
+ "prerelease", "0rc1");
22
22
  }
@@ -16,6 +16,8 @@ import static java.lang.Boolean.TRUE;
16
16
  import android.app.Activity;
17
17
  import android.content.Context;
18
18
  import android.content.Intent;
19
+ import android.net.Uri;
20
+ import android.nfc.NfcAdapter;
19
21
  import android.os.Bundle;
20
22
  import androidx.annotation.NonNull;
21
23
  import androidx.annotation.Nullable;
@@ -55,6 +57,7 @@ import com.facebook.react.fabric.FabricUIManager;
55
57
  import com.facebook.react.interfaces.TaskInterface;
56
58
  import com.facebook.react.interfaces.exceptionmanager.ReactJsExceptionHandler;
57
59
  import com.facebook.react.interfaces.fabric.ReactSurface;
60
+ import com.facebook.react.modules.appearance.AppearanceModule;
58
61
  import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
59
62
  import com.facebook.react.modules.core.DeviceEventManagerModule;
60
63
  import com.facebook.react.runtime.internal.bolts.Continuation;
@@ -647,6 +650,67 @@ public class ReactHostImpl implements ReactHost {
647
650
  "Tried to access onActivityResult while context is not ready"));
648
651
  }
649
652
 
653
+ /* To be called when focus has changed for the hosting window. */
654
+ @ThreadConfined(UI)
655
+ @Override
656
+ public void onWindowFocusChange(boolean hasFocus) {
657
+ final String method = "onWindowFocusChange(hasFocus = \"" + hasFocus + "\")";
658
+ log(method);
659
+
660
+ ReactContext currentContext = getCurrentReactContext();
661
+ if (currentContext != null) {
662
+ currentContext.onWindowFocusChange(hasFocus);
663
+ }
664
+ ReactSoftExceptionLogger.logSoftException(
665
+ TAG,
666
+ new ReactNoCrashSoftException(
667
+ "Tried to access onWindowFocusChange while context is not ready"));
668
+ }
669
+
670
+ /* This method will give JS the opportunity to receive intents via Linking.
671
+ *
672
+ * @param intent The incoming intent
673
+ */
674
+ @ThreadConfined(UI)
675
+ @Override
676
+ public void onNewIntent(Intent intent) {
677
+ log("onNewIntent()");
678
+
679
+ ReactContext currentContext = getCurrentReactContext();
680
+ if (currentContext != null) {
681
+ String action = intent.getAction();
682
+ Uri uri = intent.getData();
683
+
684
+ if (uri != null
685
+ && (Intent.ACTION_VIEW.equals(action)
686
+ || NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action))) {
687
+ DeviceEventManagerModule deviceEventManagerModule =
688
+ currentContext.getNativeModule(DeviceEventManagerModule.class);
689
+ if (deviceEventManagerModule != null) {
690
+ deviceEventManagerModule.emitNewIntentReceived(uri);
691
+ }
692
+ }
693
+ currentContext.onNewIntent(getCurrentActivity(), intent);
694
+ }
695
+ ReactSoftExceptionLogger.logSoftException(
696
+ TAG,
697
+ new ReactNoCrashSoftException("Tried to access onNewIntent while context is not ready"));
698
+ }
699
+
700
+ @ThreadConfined(UI)
701
+ @Override
702
+ public void onConfigurationChanged(Context updatedContext) {
703
+ ReactContext currentReactContext = getCurrentReactContext();
704
+ if (currentReactContext != null) {
705
+ AppearanceModule appearanceModule =
706
+ currentReactContext.getNativeModule(AppearanceModule.class);
707
+
708
+ if (appearanceModule != null) {
709
+ appearanceModule.onConfigurationChanged(updatedContext);
710
+ }
711
+ }
712
+ }
713
+
650
714
  @Nullable
651
715
  JavaScriptContextHolder getJavaScriptContextHolder() {
652
716
  final ReactInstance reactInstance = mReactInstanceTaskRef.get().getResult();
@@ -15,6 +15,7 @@ import com.facebook.infer.annotation.ThreadConfined;
15
15
  import com.facebook.infer.annotation.ThreadSafe;
16
16
  import com.facebook.jni.HybridData;
17
17
  import com.facebook.proguard.annotations.DoNotStrip;
18
+ import com.facebook.react.DebugCorePackage;
18
19
  import com.facebook.react.ReactPackage;
19
20
  import com.facebook.react.ViewManagerOnDemandReactPackage;
20
21
  import com.facebook.react.bridge.Arguments;
@@ -195,6 +196,9 @@ final class ReactInstance {
195
196
  new CoreReactPackage(
196
197
  bridgelessReactContext.getDevSupportManager(),
197
198
  bridgelessReactContext.getDefaultHardwareBackBtnHandler()));
199
+ if (useDevSupport) {
200
+ mReactPackages.add(new DebugCorePackage());
201
+ }
198
202
  mReactPackages.addAll(mDelegate.getReactPackages());
199
203
 
200
204
  TurboModuleManagerDelegate turboModuleManagerDelegate =
@@ -53,16 +53,32 @@ public final class ViewManagerRegistry implements ComponentCallbacks2 {
53
53
  * @return the {@link ViewManager} registered to the className received as a parameter
54
54
  */
55
55
  public synchronized ViewManager get(String className) {
56
+ // 1. Try to get the manager without the prefix.
56
57
  ViewManager viewManager = mViewManagers.get(className);
57
58
  if (viewManager != null) {
58
59
  return viewManager;
59
60
  }
61
+
62
+ // 2. Try to get the manager with the RCT prefix.
63
+ String rctViewManagerName = "RCT" + className;
64
+ viewManager = mViewManagers.get(rctViewManagerName);
65
+ if (viewManager != null) {
66
+ return viewManager;
67
+ }
60
68
  if (mViewManagerResolver != null) {
69
+ // 1. Try to get the manager without the prefix.
61
70
  viewManager = getViewManagerFromResolver(className);
62
71
  if (viewManager != null) return viewManager;
72
+
73
+ // 2. Try to get the manager with the RCT prefix.
74
+ viewManager = getViewManagerFromResolver(rctViewManagerName);
75
+ if (viewManager != null) return viewManager;
76
+
63
77
  throw new IllegalViewOperationException(
64
- "ViewManagerResolver returned null for "
78
+ "ViewManagerResolver returned null for either "
65
79
  + className
80
+ + " or "
81
+ + rctViewManagerName
66
82
  + ", existing names are: "
67
83
  + mViewManagerResolver.getViewManagerNames());
68
84
  }
@@ -815,7 +815,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
815
815
  // more information.
816
816
 
817
817
  if (!mScroller.isFinished() && mScroller.getCurrX() != mScroller.getFinalX()) {
818
- int scrollRange = computeHorizontalScrollRange() - getWidth();
818
+ int scrollRange = Math.max(computeHorizontalScrollRange() - getWidth(), 0);
819
819
  if (scrollX >= scrollRange) {
820
820
  mScroller.abortAnimation();
821
821
  scrollX = scrollRange;
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 74;
20
20
  int32_t Patch = 0;
21
- std::string_view Prerelease = "0rc0";
21
+ std::string_view Prerelease = "0rc1";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -168,7 +168,6 @@ std::unique_ptr<JSRuntime> HermesInstance::createJSRuntime(
168
168
  .withAllocInYoung(false)
169
169
  .withRevertToYGAtTTI(true)
170
170
  .build())
171
- .withES6Proxy(false)
172
171
  .withEnableSampleProfiling(true)
173
172
  .withMicrotaskQueue(ReactNativeFeatureFlags::enableMicrotasks())
174
173
  .withVMExperimentFlags(vmExperimentFlags);
@@ -11,6 +11,7 @@
11
11
 
12
12
  #import <React/NSDataBigString.h>
13
13
  #import <React/RCTAssert.h>
14
+ #import <React/RCTBridge+Inspector.h>
14
15
  #import <React/RCTBridge+Private.h>
15
16
  #import <React/RCTBridge.h>
16
17
  #import <React/RCTBridgeModule.h>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tvos",
3
- "version": "0.74.0-0rc0",
3
+ "version": "0.74.0-0rc1",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -65,6 +65,9 @@
65
65
  "scripts/hermes/hermes-utils.js",
66
66
  "scripts/hermes/prepare-hermes-for-build.js",
67
67
  "scripts/ios-configure-glog.sh",
68
+ "scripts/xcode/ccache-clang++.sh",
69
+ "scripts/xcode/ccache-clang.sh",
70
+ "scripts/xcode/ccache.conf",
68
71
  "scripts/xcode/with-environment.sh",
69
72
  "scripts/native_modules.rb",
70
73
  "scripts/node-binary.sh",
@@ -95,21 +98,26 @@
95
98
  "featureflags-update": "node ./scripts/featureflags/index.js"
96
99
  },
97
100
  "peerDependencies": {
101
+ "@types/react": "^18.2.6",
98
102
  "react": "18.2.0"
99
103
  },
104
+ "peerDependenciesMeta": {
105
+ "@types/react": {
106
+ "optional": true
107
+ }
108
+ },
100
109
  "dependencies": {
101
110
  "@jest/create-cache-key-function": "^29.6.3",
102
- "@react-native-community/cli": "13.6.2",
103
- "@react-native-community/cli-platform-android": "13.6.2",
104
- "@react-native-community/cli-platform-ios": "13.6.2",
105
- "@react-native/assets-registry": "0.74.75",
106
- "@react-native/codegen": "0.74.75",
107
- "@react-native/community-cli-plugin": "0.74.75",
108
- "@react-native/gradle-plugin": "0.74.75",
109
- "@react-native/js-polyfills": "0.74.75",
110
- "@react-native/normalize-colors": "0.74.75",
111
- "@react-native/virtualized-lists": "0.74.75",
112
- "@react-native-tvos/virtualized-lists": "0.74.0-0rc0",
111
+ "@react-native-community/cli": "13.6.4",
112
+ "@react-native-community/cli-platform-android": "13.6.4",
113
+ "@react-native-community/cli-platform-ios": "13.6.4",
114
+ "@react-native/assets-registry": "0.74.77",
115
+ "@react-native/codegen": "0.74.77",
116
+ "@react-native/community-cli-plugin": "0.74.77",
117
+ "@react-native/gradle-plugin": "0.74.77",
118
+ "@react-native/js-polyfills": "0.74.77",
119
+ "@react-native/normalize-colors": "0.74.77",
120
+ "@react-native-tvos/virtualized-lists": "0.74.0-0rc1",
113
121
  "abort-controller": "^3.0.0",
114
122
  "anser": "^1.4.9",
115
123
  "ansi-regex": "^5.0.0",
@@ -156,6 +164,6 @@
156
164
  ]
157
165
  },
158
166
  "devDependencies": {
159
- "react-native-core": "npm:react-native@0.74.0-rc.3"
167
+ "react-native-core": "npm:react-native@0.74.0-rc.6"
160
168
  }
161
169
  }
@@ -41,6 +41,10 @@ module Helpers
41
41
  return '13.4'
42
42
  end
43
43
 
44
+ def self.min_xcode_version_supported
45
+ return '14.3'
46
+ end
47
+
44
48
  def self.folly_config
45
49
  return {
46
50
  :version => '2024.01.01.00',
@@ -411,19 +411,39 @@ class ReactNativePodsUtils
411
411
  def self.is_using_xcode15_0(xcodebuild_manager: Xcodebuild)
412
412
  xcodebuild_version = xcodebuild_manager.version
413
413
 
414
+ if version = self.parse_xcode_version(xcodebuild_version)
415
+ return version["major"] == 15 && version["minor"] == 0
416
+ end
417
+
418
+ return false
419
+ end
420
+
421
+ def self.parse_xcode_version(version_string)
414
422
  # The output of xcodebuild -version is something like
415
423
  # Xcode 15.0
416
424
  # or
417
425
  # Xcode 14.3.1
418
426
  # We want to capture the version digits
419
- regex = /(\d+)\.(\d+)(?:\.(\d+))?/
420
- if match_data = xcodebuild_version.match(regex)
421
- major = match_data[1].to_i
422
- minor = match_data[2].to_i
423
- return major == 15 && minor == 0
427
+ match = version_string.match(/(\d+)\.(\d+)(?:\.(\d+))?/)
428
+ return nil if match.nil?
429
+
430
+ return {"str" => match[0], "major" => match[1].to_i, "minor" => match[2].to_i};
431
+ end
432
+
433
+ def self.check_minimum_required_xcode(xcodebuild_manager: Xcodebuild)
434
+ version = self.parse_xcode_version(xcodebuild_manager.version)
435
+ if (version.nil? || !Gem::Version::correct?(version["str"]))
436
+ Pod::UI.warn "Unexpected XCode version string '#{xcodebuild_manager.version}'"
437
+ return
424
438
  end
425
439
 
426
- return false
440
+ current = version["str"]
441
+ min_required = Helpers::Constants.min_xcode_version_supported
442
+
443
+ if Gem::Version::new(current) < Gem::Version::new(min_required)
444
+ Pod::UI.puts "React Native requires XCode >= #{min_required}. Found #{current}.".red
445
+ raise "Please upgrade XCode"
446
+ end
427
447
  end
428
448
 
429
449
  def self.add_compiler_flag_to_project(installer, flag, configuration: nil)
@@ -81,6 +81,8 @@ def use_react_native! (
81
81
  ENV['APP_PATH'] = app_path
82
82
  ENV['REACT_NATIVE_PATH'] = path
83
83
 
84
+ ReactNativePodsUtils.check_minimum_required_xcode()
85
+
84
86
  # Current target definition is provided by Cocoapods and it refers to the target
85
87
  # that has invoked the `use_react_native!` function.
86
88
  ReactNativePodsUtils.detect_use_frameworks(current_target_definition)
@@ -0,0 +1,14 @@
1
+ #!/bin/sh
2
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ #
4
+ # This source code is licensed under the MIT license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ # Get the absolute path of this script
8
+ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
9
+
10
+ REACT_NATIVE_CCACHE_CONFIGPATH=$SCRIPT_DIR/ccache.conf
11
+ # Provide our config file if none is already provided
12
+ export CCACHE_CONFIGPATH="${CCACHE_CONFIGPATH:-$REACT_NATIVE_CCACHE_CONFIGPATH}"
13
+
14
+ exec ccache clang++ "$@"
@@ -0,0 +1,14 @@
1
+ #!/bin/sh
2
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ #
4
+ # This source code is licensed under the MIT license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ # Get the absolute path of this script
8
+ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
9
+
10
+ REACT_NATIVE_CCACHE_CONFIGPATH=$SCRIPT_DIR/ccache.conf
11
+ # Provide our config file if none is already provided
12
+ export CCACHE_CONFIGPATH="${CCACHE_CONFIGPATH:-$REACT_NATIVE_CCACHE_CONFIGPATH}"
13
+
14
+ exec ccache clang "$@"
@@ -0,0 +1,11 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ # See https://ccache.dev/manual/4.3.html#_configuration_options for details and available options
7
+
8
+ sloppiness = clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros
9
+ file_clone = true
10
+ depend_mode = true
11
+ inode_cache = true
@@ -7,6 +7,8 @@
7
7
  # Defines functions for building various Hermes frameworks.
8
8
  # See build-ios-framework.sh and build-mac-framework.sh for usage examples.
9
9
 
10
+ set -x -e
11
+
10
12
  CURR_SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
11
13
 
12
14
  IMPORT_HERMESC_PATH=${HERMES_OVERRIDE_HERMESC_PATH:-$PWD/build_host_hermesc/ImportHermesc.cmake}
@@ -4,6 +4,8 @@
4
4
  # This source code is licensed under the MIT license found in the
5
5
  # LICENSE file in the root directory of this source tree.
6
6
 
7
+ set -x -e
8
+
7
9
  # Given a specific target, retrieve the right architecture for it
8
10
  # $1 the target you want to build. Allowed values: iphoneos, iphonesimulator, catalyst
9
11
  function get_architecture {
@@ -4,6 +4,8 @@
4
4
  # This source code is licensed under the MIT license found in the
5
5
  # LICENSE file in the root directory of this source tree.
6
6
 
7
+ set -x -e
8
+
7
9
  # shellcheck source=xplat/js/react-native-github/sdks/hermes-engine/utils/build-apple-framework.sh
8
10
  CURR_SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
9
11
  . "${CURR_SCRIPT_DIR}/build-apple-framework.sh"
Binary file
Binary file
Binary file
@@ -13,16 +13,16 @@
13
13
  "dependencies": {
14
14
  "expo": "^49.0.7",
15
15
  "react": "18.2.0",
16
- "react-native": "npm:react-native-tvos@0.74.0-0rc0"
16
+ "react-native": "npm:react-native-tvos@0.74.0-0rc1"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@babel/core": "^7.20.0",
20
20
  "@babel/preset-env": "^7.20.0",
21
21
  "@babel/runtime": "^7.20.0",
22
- "@react-native/babel-preset": "0.74.75",
23
- "@react-native/eslint-config": "0.74.75",
24
- "@react-native/metro-config": "0.74.75",
25
- "@react-native/typescript-config": "0.74.75",
22
+ "@react-native/babel-preset": "0.74.77",
23
+ "@react-native/eslint-config": "0.74.77",
24
+ "@react-native/metro-config": "0.74.77",
25
+ "@react-native/typescript-config": "0.74.77",
26
26
  "@types/react": "^18.2.6",
27
27
  "@types/react-test-renderer": "^18.0.0",
28
28
  "babel-jest": "^29.6.3",
@@ -1,23 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- package com.facebook.react.common.build;
9
-
10
- import com.facebook.react.BuildConfig;
11
-
12
- /**
13
- * Convenience class for accessing auto-generated BuildConfig so that a) other modules can just
14
- * depend on this module instead of having to manually depend on generating their own build config
15
- * and b) we don't have to deal with IntelliJ getting confused about the autogenerated BuildConfig
16
- * class all over the place.
17
- */
18
- public class ReactBuildConfig {
19
-
20
- public static final boolean DEBUG = BuildConfig.DEBUG;
21
- public static final boolean IS_INTERNAL_BUILD = BuildConfig.IS_INTERNAL_BUILD;
22
- public static final int EXOPACKAGE_FLAGS = BuildConfig.EXOPACKAGE_FLAGS;
23
- }