react-native-tvos 0.76.0-0rc0 → 0.76.0-0rc2

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 +3 -0
  2. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +10 -0
  3. package/Libraries/Components/View/ReactNativeStyleAttributes.js +2 -2
  4. package/Libraries/Core/ReactNativeVersion.js +1 -1
  5. package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -2
  6. package/Libraries/NativeComponent/BaseViewConfig.ios.js +11 -2
  7. package/Libraries/ReactNative/getNativeComponentAttributes.js +4 -0
  8. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +98 -5
  9. package/Libraries/StyleSheet/StyleSheetTypes.js +5 -5
  10. package/Libraries/StyleSheet/processBoxShadow.js +5 -7
  11. package/Libraries/StyleSheet/processFilter.js +4 -4
  12. package/React/Base/RCTVersion.m +1 -1
  13. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +23 -0
  14. package/React/Views/RCTViewManager.m +10 -9
  15. package/React/Views/ScrollView/RCTScrollView.m +20 -0
  16. package/ReactAndroid/api/ReactAndroid.api +27 -0
  17. package/ReactAndroid/build.gradle.kts +17 -8
  18. package/ReactAndroid/gradle.properties +1 -1
  19. package/ReactAndroid/hermes-engine/build.gradle.kts +0 -2
  20. package/ReactAndroid/publish.gradle +1 -1
  21. package/ReactAndroid/src/main/java/com/facebook/react/jstasks/HeadlessJsTaskContext.java +13 -14
  22. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  23. package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java +14 -9
  24. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +26 -21
  25. package/{sdks/ossonly-soloader/src/main/java/com/facebook/soloader/MergedSoMapping.kt → ReactAndroid/src/main/java/com/facebook/react/soloader/OpenSourceMergedSoMapping.kt} +6 -4
  26. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.kt +2 -2
  27. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +18 -0
  28. package/ReactAndroid/src/main/jni/first-party/jni-lib-merge/jni_lib_merge.c +2 -1
  29. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  30. package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +4 -4
  31. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHermesInstance.h +3 -0
  32. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHermesInstance.mm +7 -0
  33. package/cli.js +9 -5
  34. package/gradle/libs.versions.toml +2 -0
  35. package/jest-preset.js +5 -1
  36. package/package.json +12 -11
  37. package/scripts/cocoapods/privacy_manifest_utils.rb +23 -8
  38. package/scripts/cocoapods/utils.rb +10 -2
  39. package/scripts/react-native-xcode.sh +2 -0
  40. package/sdks/hermes-engine/hermes-engine.podspec +1 -1
  41. package/sdks/hermes-engine/utils/build-apple-framework.sh +0 -12
  42. package/sdks/hermes-engine/utils/build-ios-framework.sh +21 -4
  43. package/sdks/hermesc/osx-bin/hermes +0 -0
  44. package/sdks/hermesc/osx-bin/hermesc +0 -0
  45. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  46. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +11 -9
  47. package/types/experimental.d.ts +12 -98
  48. package/sdks/ossonly-soloader/src/main/java/com/facebook/soloader/DoNotOptimize.kt +0 -10
  49. package/sdks/ossonly-soloader/src/main/java/com/facebook/soloader/SoLoader.kt +0 -53
  50. package/sdks/ossonly-soloader/src/main/java/com/facebook/soloader/nativeloader/NativeLoader.kt +0 -28
  51. package/sdks/ossonly-soloader/src/main/java/com/facebook/soloader/nativeloader/NativeLoaderDelegate.kt +0 -23
  52. package/sdks/ossonly-soloader/src/main/java/com/facebook/soloader/nativeloader/SystemDelegate.kt +0 -10
@@ -23,6 +23,8 @@ import com.facebook.react.devsupport.HMRClient;
23
23
  import com.facebook.react.devsupport.ReactInstanceDevHelper;
24
24
  import com.facebook.react.devsupport.interfaces.DevSplitBundleCallback;
25
25
  import com.facebook.react.modules.core.DeviceEventManagerModule;
26
+ import com.facebook.react.runtime.internal.bolts.Continuation;
27
+ import com.facebook.react.runtime.internal.bolts.Task;
26
28
 
27
29
  /**
28
30
  * An implementation of {@link com.facebook.react.devsupport.interfaces.DevSupportManager} that
@@ -67,17 +69,20 @@ class BridgelessDevSupportManager extends DevSupportManagerBase {
67
69
  mReactHost
68
70
  .loadBundle(bundleLoader)
69
71
  .onSuccess(
70
- task -> {
71
- if (task.isCompleted()) {
72
- String bundleURL =
73
- getDevServerHelper().getDevServerSplitBundleURL(bundlePath);
74
- ReactContext reactContext = mReactHost.getCurrentReactContext();
75
- if (reactContext != null) {
76
- reactContext.getJSModule(HMRClient.class).registerBundle(bundleURL);
72
+ new Continuation<Boolean, Void>() {
73
+ @Override
74
+ public Void then(Task<Boolean> task) {
75
+ if (task.getResult().equals(Boolean.TRUE)) {
76
+ String bundleURL =
77
+ getDevServerHelper().getDevServerSplitBundleURL(bundlePath);
78
+ ReactContext reactContext = mReactHost.getCurrentReactContext();
79
+ if (reactContext != null) {
80
+ reactContext.getJSModule(HMRClient.class).registerBundle(bundleURL);
81
+ }
82
+ callback.onSuccess();
77
83
  }
78
- callback.onSuccess();
84
+ return null;
79
85
  }
80
- return null;
81
86
  });
82
87
  }
83
88
 
@@ -9,6 +9,8 @@ package com.facebook.react.runtime;
9
9
 
10
10
  import static com.facebook.infer.annotation.Assertions.assertNotNull;
11
11
  import static com.facebook.infer.annotation.ThreadConfined.UI;
12
+ import static java.lang.Boolean.FALSE;
13
+ import static java.lang.Boolean.TRUE;
12
14
 
13
15
  import android.app.Activity;
14
16
  import android.content.Context;
@@ -250,12 +252,13 @@ public class ReactHostImpl implements ReactHost {
250
252
 
251
253
  detachSurface(surface);
252
254
  return callWithExistingReactInstance(
253
- method,
254
- reactInstance -> {
255
- log(method, "Execute");
256
- reactInstance.stopSurface(surface);
257
- },
258
- mBGExecutor);
255
+ method,
256
+ reactInstance -> {
257
+ log(method, "Execute");
258
+ reactInstance.stopSurface(surface);
259
+ },
260
+ mBGExecutor)
261
+ .makeVoid();
259
262
  }
260
263
 
261
264
  /**
@@ -776,7 +779,7 @@ public class ReactHostImpl implements ReactHost {
776
779
  };
777
780
  }
778
781
 
779
- /* package */ Task<Void> loadBundle(final JSBundleLoader bundleLoader) {
782
+ /* package */ Task<Boolean> loadBundle(final JSBundleLoader bundleLoader) {
780
783
  final String method = "loadBundle()";
781
784
  log(method, "Schedule");
782
785
 
@@ -789,7 +792,7 @@ public class ReactHostImpl implements ReactHost {
789
792
  null);
790
793
  }
791
794
 
792
- /* package */ Task<Void> registerSegment(
795
+ /* package */ Task<Boolean> registerSegment(
793
796
  final int segmentId, final String path, final Callback callback) {
794
797
  final String method =
795
798
  "registerSegment(segmentId = \"" + segmentId + "\", path = \"" + path + "\")";
@@ -825,7 +828,7 @@ public class ReactHostImpl implements ReactHost {
825
828
  * @param args Arguments to be passed to the function
826
829
  * @return A Task that will complete when the function call has been enqueued on the JS thread.
827
830
  */
828
- /* package */ Task<Void> callFunctionOnModule(
831
+ /* package */ Task<Boolean> callFunctionOnModule(
829
832
  final String moduleName, final String methodName, final NativeArray args) {
830
833
  final String method = "callFunctionOnModule(\"" + moduleName + "\", \"" + methodName + "\")";
831
834
  return callWithExistingReactInstance(
@@ -947,9 +950,9 @@ public class ReactHostImpl implements ReactHost {
947
950
  }
948
951
 
949
952
  /** Schedule work on a ReactInstance that is already created. */
950
- private Task<Void> callWithExistingReactInstance(
953
+ private Task<Boolean> callWithExistingReactInstance(
951
954
  final String callingMethod,
952
- final ReactInstanceCalback callback,
955
+ final ReactInstanceCalback continuation,
953
956
  @Nullable Executor executor) {
954
957
  final String method = "callWithExistingReactInstance(" + callingMethod + ")";
955
958
 
@@ -959,18 +962,19 @@ public class ReactHostImpl implements ReactHost {
959
962
 
960
963
  return mCreateReactInstanceTaskRef
961
964
  .get()
962
- .continueWith(
965
+ .onSuccess(
963
966
  task -> {
964
967
  final ReactInstance reactInstance =
965
968
  ReactNativeFeatureFlags.completeReactInstanceCreationOnBgThreadOnAndroid()
966
969
  ? task.getResult()
967
970
  : mReactInstance;
968
- if (reactInstance == null || task.isFaulted()) {
971
+ if (reactInstance == null) {
969
972
  raiseSoftException(method, "Execute: reactInstance is null. Dropping work.");
970
- } else {
971
- callback.then(reactInstance);
973
+ return FALSE;
972
974
  }
973
- return null;
975
+
976
+ continuation.then(reactInstance);
977
+ return TRUE;
974
978
  },
975
979
  executor);
976
980
  }
@@ -978,7 +982,7 @@ public class ReactHostImpl implements ReactHost {
978
982
  /** Create a ReactInstance if it doesn't exist already, and schedule work on it. */
979
983
  private Task<Void> callAfterGetOrCreateReactInstance(
980
984
  final String callingMethod,
981
- final ReactInstanceCalback callback,
985
+ final ReactInstanceCalback runnable,
982
986
  @Nullable Executor executor) {
983
987
  final String method = "callAfterGetOrCreateReactInstance(" + callingMethod + ")";
984
988
 
@@ -987,17 +991,18 @@ public class ReactHostImpl implements ReactHost {
987
991
  }
988
992
 
989
993
  return getOrCreateReactInstance()
990
- .continueWith(
994
+ .onSuccess(
991
995
  task -> {
992
996
  final ReactInstance reactInstance =
993
997
  ReactNativeFeatureFlags.completeReactInstanceCreationOnBgThreadOnAndroid()
994
998
  ? task.getResult()
995
999
  : mReactInstance;
996
- if (reactInstance == null || task.isFaulted()) {
1000
+ if (reactInstance == null) {
997
1001
  raiseSoftException(method, "Execute: reactInstance is null. Dropping work.");
998
- } else {
999
- callback.then(reactInstance);
1002
+ return null;
1000
1003
  }
1004
+
1005
+ runnable.then(reactInstance);
1001
1006
  return null;
1002
1007
  },
1003
1008
  executor)
@@ -5,7 +5,9 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- package com.facebook.soloader
8
+ package com.facebook.react.soloader
9
+
10
+ import com.facebook.soloader.ExternalSoMapping
9
11
 
10
12
  /**
11
13
  * This class is a manually created MergedSoMapping.
@@ -16,9 +18,9 @@ package com.facebook.soloader
16
18
  * entry in the [invokeJniOnload] method, the [mapLibName] method as well as a new external function
17
19
  * that will take care of calling the JNI_OnLoad method.
18
20
  */
19
- public object MergedSoMapping {
21
+ public object OpenSourceMergedSoMapping : ExternalSoMapping {
20
22
 
21
- public fun mapLibName(input: String): String =
23
+ override public fun mapLibName(input: String): String =
22
24
  when (input) {
23
25
  "fabricjni",
24
26
  "jsinspector",
@@ -47,7 +49,7 @@ public object MergedSoMapping {
47
49
  else -> input
48
50
  }
49
51
 
50
- public fun invokeJniOnload(libraryName: String): Unit {
52
+ override public fun invokeJniOnload(libraryName: String): Unit {
51
53
  when (libraryName) {
52
54
  "fabricjni" -> libfabricjni_so()
53
55
  "hermes_executor" -> libhermes_executor_so()
@@ -136,8 +136,8 @@ public object ViewProps {
136
136
  public const val BORDER_START_COLOR: String = "borderStartColor"
137
137
  public const val BORDER_END_COLOR: String = "borderEndColor"
138
138
  public const val ON_LAYOUT: String = "onLayout"
139
- public const val BOX_SHADOW: String = "experimental_boxShadow"
140
- public const val FILTER: String = "experimental_filter"
139
+ public const val BOX_SHADOW: String = "boxShadow"
140
+ public const val FILTER: String = "filter"
141
141
  public const val MIX_BLEND_MODE: String = "experimental_mixBlendMode"
142
142
  public const val TRANSFORM: String = "transform"
143
143
  public const val TRANSFORM_ORIGIN: String = "transformOrigin"
@@ -7,6 +7,8 @@
7
7
 
8
8
  package com.facebook.react.views.view;
9
9
 
10
+ import android.content.Context;
11
+ import android.content.pm.PackageManager;
10
12
  import android.graphics.Rect;
11
13
  import android.util.Log;
12
14
  import android.view.View;
@@ -94,6 +96,14 @@ public class ReactViewManager extends ReactClippingViewManager<ReactViewGroup> {
94
96
  @ReactProp(name = "accessible")
95
97
  public void setAccessible(ReactViewGroup view, boolean accessible) {
96
98
  view.setFocusable(accessible);
99
+ // This is required to handle Android TV/ Fire TV Devices that are Touch Enabled as well as LeanBack
100
+ // https://developer.android.com/reference/android/view/View#requestFocus(int,%20android.graphics.Rect)
101
+ // ** A view will not actually take focus if it is not focusable (isFocusable() returns false), **
102
+ // ** or if it is focusable and it is not focusable in touch mode (isFocusableInTouchMode()) **
103
+ // ** while the device is in touch mode. **
104
+ if (hasTouchScreen(view.getContext())) {
105
+ view.setFocusableInTouchMode(accessible);
106
+ }
97
107
  }
98
108
 
99
109
  @ReactProp(name = "hasTVPreferredFocus")
@@ -498,6 +508,14 @@ public class ReactViewManager extends ReactClippingViewManager<ReactViewGroup> {
498
508
  }
499
509
  root.setFocusDestinations(fd);
500
510
  }
511
+
512
+ /**
513
+ * Utility function to help capture Android TV/ Fire TV Devices with Touch Support
514
+ */
515
+ private boolean hasTouchScreen(Context context) {
516
+ PackageManager pm = context.getPackageManager();
517
+ return pm.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN);
518
+ }
501
519
 
502
520
  @ReactProp(name = "autoFocus")
503
521
  public void setAutoFocusTV(ReactViewGroup view, boolean autoFocus) {
@@ -24,7 +24,8 @@
24
24
 
25
25
  // Class with mapping that will be generated by buck or manually edited by
26
26
  // users.
27
- static const char* invoke_class_name = "com/facebook/soloader/MergedSoMapping";
27
+ static const char* invoke_class_name =
28
+ "com/facebook/react/soloader/OpenSourceMergedSoMapping";
28
29
 
29
30
  // Stub pre-merged library to ensure that our custom section gets created
30
31
  // when we merge a group of native libraries with no JNI_OnLoad. We don't
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 76;
20
20
  int32_t Patch = 0;
21
- std::string_view Prerelease = "0rc0";
21
+ std::string_view Prerelease = "0rc2";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -229,7 +229,7 @@ BaseViewProps::BaseViewProps(
229
229
  : convertRawProp(
230
230
  context,
231
231
  rawProps,
232
- "experimental_boxShadow",
232
+ "boxShadow",
233
233
  sourceProps.boxShadow,
234
234
  {})),
235
235
  filter(
@@ -237,7 +237,7 @@ BaseViewProps::BaseViewProps(
237
237
  : convertRawProp(
238
238
  context,
239
239
  rawProps,
240
- "experimental_filter",
240
+ "filter",
241
241
  sourceProps.filter,
242
242
  {})),
243
243
  backgroundImage(
@@ -420,8 +420,8 @@ void BaseViewProps::setProp(
420
420
  RAW_SET_PROP_SWITCH_CASE_BASIC(removeClippedSubviews);
421
421
  RAW_SET_PROP_SWITCH_CASE_BASIC(experimental_layoutConformance);
422
422
  RAW_SET_PROP_SWITCH_CASE_BASIC(cursor);
423
- RAW_SET_PROP_SWITCH_CASE(filter, "experimental_filter");
424
- RAW_SET_PROP_SWITCH_CASE(boxShadow, "experimental_boxShadow");
423
+ RAW_SET_PROP_SWITCH_CASE(filter, "filter");
424
+ RAW_SET_PROP_SWITCH_CASE(boxShadow, "boxShadow");
425
425
  #if TARGET_OS_TV
426
426
  RAW_SET_PROP_SWITCH_CASE_BASIC(isTVSelectable);
427
427
  RAW_SET_PROP_SWITCH_CASE_BASIC(hasTVPreferredFocus);
@@ -22,6 +22,9 @@ using CrashManagerProvider =
22
22
  class RCTHermesInstance : public JSRuntimeFactory {
23
23
  public:
24
24
  RCTHermesInstance();
25
+ RCTHermesInstance(
26
+ std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
27
+ CrashManagerProvider crashManagerProvider);
25
28
  RCTHermesInstance(
26
29
  std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
27
30
  CrashManagerProvider crashManagerProvider,
@@ -11,6 +11,13 @@ namespace facebook::react {
11
11
 
12
12
  RCTHermesInstance::RCTHermesInstance() : RCTHermesInstance(nullptr, nullptr, false) {}
13
13
 
14
+ RCTHermesInstance::RCTHermesInstance(
15
+ std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
16
+ CrashManagerProvider crashManagerProvider)
17
+ : RCTHermesInstance(reactNativeConfig, std::move(crashManagerProvider), false)
18
+ {
19
+ }
20
+
14
21
  RCTHermesInstance::RCTHermesInstance(
15
22
  std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
16
23
  CrashManagerProvider crashManagerProvider,
package/cli.js CHANGED
@@ -109,7 +109,7 @@ function warnWithDeprecationSchedule() {
109
109
  ${chalk.yellow('⚠️')} The \`init\` command is deprecated.
110
110
  The behavior will be changed on ${chalk.white.bold(CLI_DEPRECATION_DATE.toLocaleDateString())} ${emphasis(`(${daysRemaining} day${daysRemaining > 1 ? 's' : ''})`)}.
111
111
 
112
- - Switch to ${chalk.dim('npx @react-native-community/cli init')} for the identical behavior.
112
+ - Switch to ${chalk.grey.bold('npx @react-native-community/cli init')} for the identical behavior.
113
113
  - Refer to the documentation for information about alternative tools: ${chalk.dim('https://reactnative.dev/docs/getting-started')}`);
114
114
  }
115
115
 
@@ -117,11 +117,10 @@ function warnWithDeprecated() {
117
117
  if (!isInitCommand) {
118
118
  return;
119
119
  }
120
-
121
120
  console.warn(`
122
121
  🚨️ The \`init\` command is deprecated.
123
122
 
124
- - Switch to ${chalk.dim('npx @react-native-community/cli init')} for the identical behavior.
123
+ - Switch to ${chalk.grey.bold('npx @react-native-community/cli init')} for the identical behavior.
125
124
  - Refer to the documentation for information about alternative tools: ${chalk.dim('https://reactnative.dev/docs/getting-started')}`);
126
125
  }
127
126
 
@@ -174,7 +173,7 @@ async function main() {
174
173
 
175
174
  const isDeprecated =
176
175
  CLI_DEPRECATION_DATE.getTime() <= new Date().getTime() ||
177
- currentVersion.startsWith('0.76');
176
+ currentVersion.startsWith('0.77');
178
177
 
179
178
  /**
180
179
  * This command is now deprecated. We will continue to proxy commands to @react-native-community/cli, but it
@@ -191,8 +190,13 @@ async function main() {
191
190
  warnWithDeprecated();
192
191
  // We only exit if the user calls `init` and it's deprecated. All other cases should proxy to to @react-native-community/cli.
193
192
  // Be careful with this as it can break a lot of users.
193
+ console.warn(`${chalk.green('Exiting...')}`);
194
194
  process.exit(1);
195
- } else if (currentVersion.startsWith('0.75')) {
195
+ } else if (
196
+ currentVersion.startsWith('0.75') ||
197
+ currentVersion.startsWith('0.76')
198
+ ) {
199
+ // We check deprecation schedule only for 0.75 and 0.76 and 0.77 is expected to land in Jan 2025.
196
200
  warnWithDeprecationSchedule();
197
201
  }
198
202
  warnWhenRunningInit();
@@ -29,6 +29,7 @@ nexus-publish = "1.3.0"
29
29
  okhttp = "4.9.2"
30
30
  okio = "2.9.0"
31
31
  robolectric = "4.9.2"
32
+ soloader = "0.12.1"
32
33
  xstream = "1.4.20"
33
34
  yoga-proguard-annotations = "1.19.0"
34
35
  # Native Dependencies
@@ -55,6 +56,7 @@ fresco-middleware = { module = "com.facebook.fresco:middleware", version.ref = "
55
56
  fresco-imagepipeline-okhttp3 = { module = "com.facebook.fresco:imagepipeline-okhttp3", version.ref = "fresco" }
56
57
  fresco-ui-common = { module = "com.facebook.fresco:ui-common", version.ref = "fresco" }
57
58
  infer-annotation = { module = "com.facebook.infer.annotation:infer-annotation", version.ref = "infer-annotation" }
59
+ soloader = { module = "com.facebook.soloader:soloader", version.ref = "soloader" }
58
60
  yoga-proguard-annotations = { module = "com.facebook.yoga:proguard-annotations", version.ref = "yoga-proguard-annotations" }
59
61
 
60
62
  jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "jsr305" }
package/jest-preset.js CHANGED
@@ -15,7 +15,11 @@ module.exports = {
15
15
  platforms: ['android', 'ios', 'native'],
16
16
  },
17
17
  transform: {
18
- '^.+\\.(js|ts|tsx)$': 'babel-jest',
18
+ '^.+\\.(js)$': [
19
+ 'babel-jest',
20
+ {plugins: ['babel-plugin-syntax-hermes-parser']},
21
+ ],
22
+ '^.+\\.(ts|tsx)$': 'babel-jest',
19
23
  '^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$': require.resolve(
20
24
  './jest/assetFileTransformer.js',
21
25
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tvos",
3
- "version": "0.76.0-0rc0",
3
+ "version": "0.76.0-0rc2",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -83,7 +83,6 @@
83
83
  "scripts/react-native-xcode.sh",
84
84
  "sdks/.hermesversion",
85
85
  "sdks/hermes-engine",
86
- "sdks/ossonly-soloader",
87
86
  "sdks/hermesc",
88
87
  "settings.gradle.kts",
89
88
  "src",
@@ -111,16 +110,18 @@
111
110
  },
112
111
  "dependencies": {
113
112
  "@jest/create-cache-key-function": "^29.6.3",
114
- "@react-native/assets-registry": "0.76.0-rc.0",
115
- "@react-native/codegen": "0.76.0-rc.0",
116
- "@react-native/community-cli-plugin": "0.76.0-rc.0",
117
- "@react-native/gradle-plugin": "0.76.0-rc.0",
118
- "@react-native/js-polyfills": "0.76.0-rc.0",
119
- "@react-native/normalize-colors": "0.76.0-rc.0",
120
- "@react-native-tvos/virtualized-lists": "0.76.0-0rc0",
113
+ "@react-native/assets-registry": "0.76.0-rc.2",
114
+ "@react-native/codegen": "0.76.0-rc.2",
115
+ "@react-native/community-cli-plugin": "0.76.0-rc.2",
116
+ "@react-native/gradle-plugin": "0.76.0-rc.2",
117
+ "@react-native/js-polyfills": "0.76.0-rc.2",
118
+ "@react-native/normalize-colors": "0.76.0-rc.2",
119
+ "@react-native-tvos/virtualized-lists": "0.76.0-0rc2",
121
120
  "abort-controller": "^3.0.0",
122
121
  "anser": "^1.4.9",
123
122
  "ansi-regex": "^5.0.0",
123
+ "babel-jest": "^29.7.0",
124
+ "babel-plugin-syntax-hermes-parser": "^0.23.1",
124
125
  "base64-js": "^1.5.1",
125
126
  "chalk": "^4.0.0",
126
127
  "commander": "^12.0.0",
@@ -131,8 +132,8 @@
131
132
  "jest-environment-node": "^29.6.3",
132
133
  "jsc-android": "^250231.0.0",
133
134
  "memoize-one": "^5.0.0",
134
- "metro-runtime": "^0.80.10",
135
- "metro-source-map": "^0.80.10",
135
+ "metro-runtime": "^0.81.0-alpha.0",
136
+ "metro-source-map": "^0.81.0-alpha.0",
136
137
  "mkdirp": "^0.5.1",
137
138
  "nullthrows": "^1.1.1",
138
139
  "pretty-format": "^29.7.0",
@@ -67,14 +67,29 @@ module PrivacyManifestUtils
67
67
  end
68
68
 
69
69
  def self.ensure_reference(file_path, user_project, target)
70
- reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref&.path&.end_with? "PrivacyInfo.xcprivacy" }
71
- unless reference_exists
72
- # We try to find the main group, but if it doesn't exist, we default to adding the file to the project root both work
73
- file_root = user_project.root_object.main_group.children.find { |group|
74
- group.class == Xcodeproj::Project::Object::PBXGroup && (group.name == target.name || group.path == target.name)
75
- } || user_project
76
- file_ref = file_root.new_file(file_path)
77
- build_file = target.resources_build_phase.add_file_reference(file_ref, true)
70
+ privacy_info_filename = File.basename(file_path)
71
+
72
+ # Check if the file is already in the PBXBuildFile section
73
+ build_phase_reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref&.path&.end_with?(privacy_info_filename) }
74
+
75
+ unless build_phase_reference_exists
76
+ # Check if the file is already in the PBXFileReference section
77
+ existing_file_reference = user_project.files.find { |file| file.path&.end_with?(privacy_info_filename) }
78
+
79
+ if existing_file_reference
80
+ # If the file reference exists, add it to the build phase
81
+ target.resources_build_phase.add_file_reference(existing_file_reference, true)
82
+ else
83
+ # If the file reference doesn't exist, add it to the project and the build phase
84
+ # We try to find the main group, but if it doesn't exist, we default to adding the file to the project root - both work
85
+ file_root = user_project.root_object.main_group.children.find { |group|
86
+ group.class == Xcodeproj::Project::Object::PBXGroup && (group.name == target.name || group.path == target.name)
87
+ } || user_project
88
+ puts "file_root: #{file_root}"
89
+
90
+ file_ref = file_root.new_file(file_path)
91
+ target.resources_build_phase.add_file_reference(file_ref, true)
92
+ end
78
93
  end
79
94
  end
80
95
 
@@ -700,10 +700,18 @@ class ReactNativePodsUtils
700
700
  map[field] = "$(inherited)" + flag
701
701
  else
702
702
  unless map[field].include?(flag)
703
- map[field] = map[field] + flag
703
+ if map[field].instance_of? String
704
+ map[field] = map[field] + flag
705
+ elsif map[field].instance_of? Array
706
+ map[field].push(flag)
707
+ end
704
708
  end
705
709
  unless map[field].include?("$(inherited)")
706
- map[field] = "$(inherited) " + map[field]
710
+ if map[field].instance_of? String
711
+ map[field] = "$(inherited) " + map[field]
712
+ elsif map[field].instance_of? Array
713
+ map[field].unshift("$(inherited)")
714
+ end
707
715
  end
708
716
  end
709
717
  end
@@ -92,6 +92,8 @@ fi
92
92
 
93
93
  [ -z "$CLI_PATH" ] && CLI_PATH="$REACT_NATIVE_DIR/scripts/bundle.js"
94
94
 
95
+ [ -z "$BUNDLE_COMMAND" ] && BUNDLE_COMMAND="bundle"
96
+
95
97
  [ -z "$COMPOSE_SOURCEMAP_PATH" ] && COMPOSE_SOURCEMAP_PATH="$REACT_NATIVE_DIR/scripts/compose-source-maps.js"
96
98
 
97
99
  if [[ -z "$BUNDLE_CONFIG" ]]; then
@@ -8,7 +8,7 @@ require_relative "./hermes-utils.rb"
8
8
 
9
9
  react_native_path = File.dirname(Pod::Executable.execute_command('node', ['-p',
10
10
  'require.resolve(
11
- "react-native-tvos",
11
+ "react-native",
12
12
  {paths: [process.argv[1]]},
13
13
  )', __dir__]).strip
14
14
  )
@@ -224,19 +224,7 @@ function create_universal_framework {
224
224
  for i in "${!platforms[@]}"; do
225
225
  local platform="${platforms[$i]}"
226
226
  local hermes_framework_path="${platform}/hermes.framework"
227
- local dSYM_path="$hermes_framework_path"
228
- local dSYM_base_path="$HERMES_PATH/destroot/Library/Frameworks"
229
-
230
- # If the dSYM rename has failed, the dSYM are generated as 0.dSYM
231
- # (Apple default name) rather then hermes.framework.dSYM.
232
- if [[ -e "$dSYM_base_path/${platform}/0.dSYM" ]]; then
233
- dSYM_path="${platform}/0"
234
- fi
235
-
236
227
  args+="-framework $hermes_framework_path "
237
-
238
- # Path to dSYM must be absolute
239
- args+="-debug-symbols $dSYM_base_path/$dSYM_path.dSYM "
240
228
  done
241
229
 
242
230
  mkdir -p universal
@@ -52,10 +52,24 @@ function build_framework {
52
52
  fi
53
53
  }
54
54
 
55
+ # Allows RNTV CI to optionally build Vision OS framework
56
+ function set_include_vision {
57
+ if [[ "$INCLUDE_VISION_OS" == "0" || "$INCLUDE_VISION_OS" == "false" || "$INCLUDE_VISION_OS" == "FALSE" ]]; then
58
+ include_vision=0
59
+ else
60
+ include_vision=1
61
+ fi
62
+ }
63
+
55
64
  # group the frameworks together to create a universal framework
56
65
  function build_universal_framework {
57
66
  if [ ! -d destroot/Library/Frameworks/universal/hermes.xcframework ]; then
58
- create_universal_framework "iphoneos" "iphonesimulator" "catalyst" "xros" "xrsimulator" "appletvos" "appletvsimulator"
67
+ set_include_vision
68
+ if [[ $include_vision == 1 ]]; then
69
+ create_universal_framework "iphoneos" "iphonesimulator" "catalyst" "xros" "xrsimulator" "appletvos" "appletvsimulator"
70
+ else
71
+ create_universal_framework "iphoneos" "iphonesimulator" "catalyst" "appletvos" "appletvsimulator"
72
+ fi
59
73
  else
60
74
  echo "Skipping; Clean \"destroot\" to rebuild".
61
75
  fi
@@ -65,14 +79,17 @@ function build_universal_framework {
65
79
  # this is used to preserve backward compatibility
66
80
  function create_framework {
67
81
  if [ ! -d destroot/Library/Frameworks/universal/hermes.xcframework ]; then
82
+ set_include_vision
83
+
68
84
  build_framework "iphoneos"
69
85
  build_framework "iphonesimulator"
70
86
  build_framework "appletvos"
71
87
  build_framework "appletvsimulator"
72
88
  build_framework "catalyst"
73
- build_framework "xros"
74
- build_framework "xrsimulator"
75
-
89
+ if [[ $include_vision == 1 ]]; then
90
+ build_framework "xros"
91
+ build_framework "xrsimulator"
92
+ fi
76
93
  build_universal_framework
77
94
  else
78
95
  echo "Skipping; Clean \"destroot\" to rebuild".
Binary file
Binary file
Binary file
@@ -13,15 +13,17 @@ import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
13
13
  import Platform from '../../../Libraries/Utilities/Platform';
14
14
  import View from '../../../Libraries/Components/View/View';
15
15
  import * as React from 'react';
16
- export * from '../../../src/private/specs/components/RCTSafeAreaViewNativeComponent';
17
- import RCTSafeAreaViewNativeComponent from '../../../src/private/specs/components/RCTSafeAreaViewNativeComponent';
18
16
 
19
- let exported: React.AbstractComponent<ViewProps, React.ElementRef<typeof View>>;
20
-
21
- if (Platform.OS === 'android' || Platform.OS === 'ios') {
22
- exported = RCTSafeAreaViewNativeComponent;
23
- } else {
24
- exported = View;
25
- }
17
+ const exported: React.AbstractComponent<
18
+ ViewProps,
19
+ React.ElementRef<typeof View>,
20
+ > = Platform.select({
21
+ ios: require('../../../src/private/specs/components/RCTSafeAreaViewNativeComponent')
22
+ .default,
23
+ android:
24
+ require('../../../src/private/specs/components/RCTSafeAreaViewNativeComponent')
25
+ .default,
26
+ default: View,
27
+ });
26
28
 
27
29
  export default exported;