Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ NS_ASSUME_NONNULL_BEGIN
*/

@interface RCTDefaultReactNativeFactoryDelegate : UIResponder <RCTReactNativeFactoryDelegate>

- (nonnull NSArray<NSString *> *)getModuleNames;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ - (Class)getModuleClassFromName:(const char *)name
return nullptr;
}

- (nonnull NSArray<NSString *> *)getModuleNames{
if([dependencyProvider respondsToSelector:@selector(moduleNames)]) {
return [dependencyProvider moduleNames];
}
return @[];
}

- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
{
return nullptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ NS_ASSUME_NONNULL_BEGIN

- (nonnull NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders;

@optional
- (nonnull NSArray<NSString *> *)moduleNames;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ - (BOOL)bridgelessEnabled

#pragma mark - RCTTurboModuleManagerDelegate

- (nonnull NSArray<NSString *> *)getModuleNames{
if ([_delegate respondsToSelector:@selector(getModuleNames)]) {
return [_delegate getModuleNames];
}
return @[];
}

- (Class)getModuleClassFromName:(const char *)name
{
#if RN_DISABLE_OSS_PLUGIN_HEADER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<2294f3350aca0f19862f8cfdbe9479b6>>
* @generated SignedSource<<7c5701ed1e7ddafa497364e72afbbbe2>>
*/

/**
Expand Down Expand Up @@ -318,6 +318,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun hideOffscreenVirtualViewsOnIOS(): Boolean = accessor.hideOffscreenVirtualViewsOnIOS()

/**
* Enables creating Module Holders for TurboModules before the JS Runtime is started, iOS only. Android already creates them early.
*/
@JvmStatic
public fun iosEarlyTurboModuleDiscovery(): Boolean = accessor.iosEarlyTurboModuleDiscovery()

/**
* Enable the V2 in-app Performance Monitor. This flag is global and should not be changed across React Host lifetimes.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<9f50b2fc5f4aad27e6cd8ecbde3d791a>>
* @generated SignedSource<<4e4dc5cc02194f3c632c49bb11f50be5>>
*/

/**
Expand Down Expand Up @@ -68,6 +68,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var fuseboxEnabledReleaseCache: Boolean? = null
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
private var hideOffscreenVirtualViewsOnIOSCache: Boolean? = null
private var iosEarlyTurboModuleDiscoveryCache: Boolean? = null
private var perfMonitorV2EnabledCache: Boolean? = null
private var preparedTextCacheSizeCache: Double? = null
private var preventShadowTreeCommitExhaustionCache: Boolean? = null
Expand Down Expand Up @@ -521,6 +522,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun iosEarlyTurboModuleDiscovery(): Boolean {
var cached = iosEarlyTurboModuleDiscoveryCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.iosEarlyTurboModuleDiscovery()
iosEarlyTurboModuleDiscoveryCache = cached
}
return cached
}

override fun perfMonitorV2Enabled(): Boolean {
var cached = perfMonitorV2EnabledCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<27b8c102b60eadcf284fd3c156a037aa>>
* @generated SignedSource<<62beb45b5693fbdc4ff6b64e7f9b8898>>
*/

/**
Expand Down Expand Up @@ -124,6 +124,8 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun hideOffscreenVirtualViewsOnIOS(): Boolean

@DoNotStrip @JvmStatic public external fun iosEarlyTurboModuleDiscovery(): Boolean

@DoNotStrip @JvmStatic public external fun perfMonitorV2Enabled(): Boolean

@DoNotStrip @JvmStatic public external fun preparedTextCacheSize(): Double
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<9583365cd9d7786ee9be03ff34b0766f>>
* @generated SignedSource<<47f42b3f088e12eb24ad4343d8275d55>>
*/

/**
Expand Down Expand Up @@ -119,6 +119,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun hideOffscreenVirtualViewsOnIOS(): Boolean = false

override fun iosEarlyTurboModuleDiscovery(): Boolean = false

override fun perfMonitorV2Enabled(): Boolean = false

override fun preparedTextCacheSize(): Double = 200.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<8bcbcc20f92faf4c50c093fac701dfa2>>
* @generated SignedSource<<c941c56448131920f87162a281442a5c>>
*/

/**
Expand Down Expand Up @@ -72,6 +72,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var fuseboxEnabledReleaseCache: Boolean? = null
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
private var hideOffscreenVirtualViewsOnIOSCache: Boolean? = null
private var iosEarlyTurboModuleDiscoveryCache: Boolean? = null
private var perfMonitorV2EnabledCache: Boolean? = null
private var preparedTextCacheSizeCache: Double? = null
private var preventShadowTreeCommitExhaustionCache: Boolean? = null
Expand Down Expand Up @@ -573,6 +574,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

override fun iosEarlyTurboModuleDiscovery(): Boolean {
var cached = iosEarlyTurboModuleDiscoveryCache
if (cached == null) {
cached = currentProvider.iosEarlyTurboModuleDiscovery()
accessedFeatureFlags.add("iosEarlyTurboModuleDiscovery")
iosEarlyTurboModuleDiscoveryCache = cached
}
return cached
}

override fun perfMonitorV2Enabled(): Boolean {
var cached = perfMonitorV2EnabledCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<8a2403250a16c2b2b573fc05db6e4768>>
* @generated SignedSource<<db29e34cc63e19acccd6e9e07a44b3d8>>
*/

/**
Expand Down Expand Up @@ -119,6 +119,8 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun hideOffscreenVirtualViewsOnIOS(): Boolean

@DoNotStrip public fun iosEarlyTurboModuleDiscovery(): Boolean

@DoNotStrip public fun perfMonitorV2Enabled(): Boolean

@DoNotStrip public fun preparedTextCacheSize(): Double
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<72694e8b935e15e4b826a0174fd0c23f>>
* @generated SignedSource<<14a636939fc8f8030580ae7eb91a68b2>>
*/

/**
Expand Down Expand Up @@ -327,6 +327,12 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}

bool iosEarlyTurboModuleDiscovery() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("iosEarlyTurboModuleDiscovery");
return method(javaProvider_);
}

bool perfMonitorV2Enabled() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("perfMonitorV2Enabled");
Expand Down Expand Up @@ -691,6 +697,11 @@ bool JReactNativeFeatureFlagsCxxInterop::hideOffscreenVirtualViewsOnIOS(
return ReactNativeFeatureFlags::hideOffscreenVirtualViewsOnIOS();
}

bool JReactNativeFeatureFlagsCxxInterop::iosEarlyTurboModuleDiscovery(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::iosEarlyTurboModuleDiscovery();
}

bool JReactNativeFeatureFlagsCxxInterop::perfMonitorV2Enabled(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::perfMonitorV2Enabled();
Expand Down Expand Up @@ -966,6 +977,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"hideOffscreenVirtualViewsOnIOS",
JReactNativeFeatureFlagsCxxInterop::hideOffscreenVirtualViewsOnIOS),
makeNativeMethod(
"iosEarlyTurboModuleDiscovery",
JReactNativeFeatureFlagsCxxInterop::iosEarlyTurboModuleDiscovery),
makeNativeMethod(
"perfMonitorV2Enabled",
JReactNativeFeatureFlagsCxxInterop::perfMonitorV2Enabled),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<90f0583b9d527a1291431a8318f10356>>
* @generated SignedSource<<8eb2ab1bec309868f89e24ad99ad14f0>>
*/

/**
Expand Down Expand Up @@ -174,6 +174,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool hideOffscreenVirtualViewsOnIOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool iosEarlyTurboModuleDiscovery(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool perfMonitorV2Enabled(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<6ff8aafa0de2f6c5cf8b42e0d43302e9>>
* @generated SignedSource<<36d94f6f70fde06dd23ca68804d99181>>
*/

/**
Expand Down Expand Up @@ -218,6 +218,10 @@ bool ReactNativeFeatureFlags::hideOffscreenVirtualViewsOnIOS() {
return getAccessor().hideOffscreenVirtualViewsOnIOS();
}

bool ReactNativeFeatureFlags::iosEarlyTurboModuleDiscovery() {
return getAccessor().iosEarlyTurboModuleDiscovery();
}

bool ReactNativeFeatureFlags::perfMonitorV2Enabled() {
return getAccessor().perfMonitorV2Enabled();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<de9db1b4e8ad4d4a81368613a7d1cfb2>>
* @generated SignedSource<<a17777271d96555d577c8d9dca867918>>
*/

/**
Expand Down Expand Up @@ -279,6 +279,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool hideOffscreenVirtualViewsOnIOS();

/**
* Enables creating Module Holders for TurboModules before the JS Runtime is started, iOS only. Android already creates them early.
*/
RN_EXPORT static bool iosEarlyTurboModuleDiscovery();

/**
* Enable the V2 in-app Performance Monitor. This flag is global and should not be changed across React Host lifetimes.
*/
Expand Down
Loading
Loading