Skip to content

Commit

Permalink
feat: add support for dynamic frameworks (#2315)
Browse files Browse the repository at this point in the history
PR adding load method needed for dynamic frameworks to work with the library. See facebook/react-native#37274 for more information.

(cherry picked from commit 29c98e2)
  • Loading branch information
WoLewicki authored and kkafar committed Oct 25, 2024
1 parent 44d1813 commit ad9d975
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ios/RNSFullWindowOverlay.mm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@

@implementation RNSFullWindowOverlayContainer

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
Expand Down
7 changes: 7 additions & 0 deletions ios/RNSModalScreen.mm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection
}

#ifdef RCT_NEW_ARCH_ENABLED

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

+ (react::ComponentDescriptorProvider)componentDescriptorProvider
{
return react::concreteComponentDescriptorProvider<react::RNSModalScreenComponentDescriptor>();
Expand Down
7 changes: 7 additions & 0 deletions ios/RNSScreen.mm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ @implementation RNSScreenView {
}

#ifdef RCT_NEW_ARCH_ENABLED

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
Expand Down
6 changes: 6 additions & 0 deletions ios/RNSScreenContainer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ - (void)layoutSubviews
#pragma mark-- Fabric specific
#ifdef RCT_NEW_ARCH_ENABLED

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
{
if (![childComponentView isKindOfClass:[RNSScreenView class]]) {
Expand Down
7 changes: 7 additions & 0 deletions ios/RNSScreenNavigationContainer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ - (void)updateContainer
{
return react::concreteComponentDescriptorProvider<react::RNSScreenNavigationContainerComponentDescriptor>();
}

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

#endif

@end
Expand Down
7 changes: 7 additions & 0 deletions ios/RNSScreenStack.mm
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ @implementation RNSScreenStackView {
}

#ifdef RCT_NEW_ARCH_ENABLED

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
Expand Down
7 changes: 7 additions & 0 deletions ios/RNSScreenStackHeaderConfig.mm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ @implementation RNSScreenStackHeaderConfig {
}

#ifdef RCT_NEW_ARCH_ENABLED

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
Expand Down
6 changes: 6 additions & 0 deletions ios/RNSScreenStackHeaderSubview.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ @implementation RNSScreenStackHeaderSubview

#pragma mark - Fabric specific

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
Expand Down
7 changes: 7 additions & 0 deletions ios/RNSSearchBar.mm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge
}

#ifdef RCT_NEW_ARCH_ENABLED

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

- (instancetype)init
{
if (self = [super init]) {
Expand Down

0 comments on commit ad9d975

Please sign in to comment.