Skip to content

Commit ad9d975

Browse files
WoLewickikkafar
authored andcommitted
feat: add support for dynamic frameworks (#2315)
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)
1 parent 44d1813 commit ad9d975

9 files changed

+60
-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
@@ -53,6 +53,13 @@ @implementation RNSScreenView {
5353
}
5454

5555
#ifdef RCT_NEW_ARCH_ENABLED
56+
57+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
58+
+ (void)load
59+
{
60+
[super load];
61+
}
62+
5663
- (instancetype)initWithFrame:(CGRect)frame
5764
{
5865
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/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]) {

ios/RNSSearchBar.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge
3737
}
3838

3939
#ifdef RCT_NEW_ARCH_ENABLED
40+
41+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
42+
+ (void)load
43+
{
44+
[super load];
45+
}
46+
4047
- (instancetype)init
4148
{
4249
if (self = [super init]) {

0 commit comments

Comments
 (0)