Skip to content

Commit a87a1ac

Browse files
WoLewickija1ns
authored andcommitted
feat: add support for dynamic frameworks (software-mansion#2315)
PR adding load method needed for dynamic frameworks to work with the library. See facebook/react-native#37274 for more information.
1 parent 7b71279 commit a87a1ac

11 files changed

+72
-0
lines changed

ios/RNSFullWindowOverlay.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515

1616
@implementation RNSFullWindowOverlayContainer
1717

18+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
19+
+ (void)load
20+
{
21+
[super load];
22+
}
23+
1824
- (instancetype)initWithFrame:(CGRect)frame
1925
{
2026
if (self = [super initWithFrame:frame]) {

ios/RNSModalScreen.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection
3030
}
3131

3232
#ifdef RCT_NEW_ARCH_ENABLED
33+
34+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
35+
+ (void)load
36+
{
37+
[super load];
38+
}
39+
3340
+ (react::ComponentDescriptorProvider)componentDescriptorProvider
3441
{
3542
return react::concreteComponentDescriptorProvider<react::RNSModalScreenComponentDescriptor>();

ios/RNSScreen.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ @implementation RNSScreenView {
7575
}
7676

7777
#ifdef RCT_NEW_ARCH_ENABLED
78+
79+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
80+
+ (void)load
81+
{
82+
[super load];
83+
}
84+
7885
- (instancetype)initWithFrame:(CGRect)frame
7986
{
8087
if (self = [super initWithFrame:frame]) {

ios/RNSScreenContainer.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,12 @@ - (void)layoutSubviews
251251
#pragma mark-- Fabric specific
252252
#ifdef RCT_NEW_ARCH_ENABLED
253253

254+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
255+
+ (void)load
256+
{
257+
[super load];
258+
}
259+
254260
- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
255261
{
256262
if (![childComponentView isKindOfClass:[RNSScreenView class]]) {

ios/RNSScreenContentWrapper.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ - (void)updateLayoutMetrics:(const facebook::react::LayoutMetrics &)layoutMetric
3636
}
3737
}
3838

39+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
40+
+ (void)load
41+
{
42+
[super load];
43+
}
44+
3945
+ (react::ComponentDescriptorProvider)componentDescriptorProvider
4046
{
4147
return react::concreteComponentDescriptorProvider<react::RNSScreenContentWrapperComponentDescriptor>();

ios/RNSScreenFooter.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ - (void)layoutSubviews
100100

101101
#pragma Fabric specific
102102

103+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
104+
+ (void)load
105+
{
106+
[super load];
107+
}
108+
103109
+ (react::ComponentDescriptorProvider)componentDescriptorProvider
104110
{
105111
return react::concreteComponentDescriptorProvider<react::RNSScreenFooterComponentDescriptor>();

ios/RNSScreenNavigationContainer.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ - (void)updateContainer
4343
{
4444
return react::concreteComponentDescriptorProvider<react::RNSScreenNavigationContainerComponentDescriptor>();
4545
}
46+
47+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
48+
+ (void)load
49+
{
50+
[super load];
51+
}
52+
4653
#endif
4754

4855
@end

ios/RNSScreenStack.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ @implementation RNSScreenStackView {
123123
}
124124

125125
#ifdef RCT_NEW_ARCH_ENABLED
126+
127+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
128+
+ (void)load
129+
{
130+
[super load];
131+
}
132+
126133
- (instancetype)initWithFrame:(CGRect)frame
127134
{
128135
if (self = [super initWithFrame:frame]) {

ios/RNSScreenStackHeaderConfig.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ @implementation RNSScreenStackHeaderConfig {
6262
}
6363

6464
#ifdef RCT_NEW_ARCH_ENABLED
65+
66+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
67+
+ (void)load
68+
{
69+
[super load];
70+
}
71+
6572
- (instancetype)initWithFrame:(CGRect)frame
6673
{
6774
if (self = [super initWithFrame:frame]) {

ios/RNSScreenStackHeaderSubview.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ @implementation RNSScreenStackHeaderSubview
2626

2727
#pragma mark - Fabric specific
2828

29+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
30+
+ (void)load
31+
{
32+
[super load];
33+
}
34+
2935
- (instancetype)initWithFrame:(CGRect)frame
3036
{
3137
if (self = [super initWithFrame:frame]) {

0 commit comments

Comments
 (0)