Skip to content

Commit 4a5674d

Browse files
authored
feat: add load method (#2427)
## PR concerning New Architecture support in the library 🎉 We at [Software Mansion](https://swmansion.com/) have been working on [improving support](https://blog.swmansion.com/sunrising-new-architecture-in-the-new-expensify-app-729d237a02f5) for the new architecture for quite a while now. If you need help with anything related to New Architecture, like: - [migrating your library](https://x.com/swmansion/status/1717512089323864275) - [migrating your app](Expensify/App#13767) - [investigating issues](https://github.com/facebook/react-native/pulls?q=sort%3Aupdated-desc+is%3Apr+author%3Aj-piasecki+is%3Aopen) - [improving performance](https://x.com/BBloniarz_/status/1808138585528303977) or you just want to ask any questions, hit us up on [[email protected]](mailto:[email protected]) --- ## Summary <!-- Simple summary of what was changed. --> PR adding `load` method needed for dynamic frameworks to work with the library. See facebook/react-native#37274 for more information.
1 parent a089cc2 commit 4a5674d

26 files changed

+156
-0
lines changed

apple/Elements/RNSVGClipPath.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ @implementation RNSVGClipPath
2121
#ifdef RCT_NEW_ARCH_ENABLED
2222
using namespace facebook::react;
2323

24+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
25+
+ (void)load
26+
{
27+
[super load];
28+
}
29+
2430
- (instancetype)initWithFrame:(CGRect)frame
2531
{
2632
if (self = [super initWithFrame:frame]) {

apple/Elements/RNSVGDefs.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ @implementation RNSVGDefs
2020
#ifdef RCT_NEW_ARCH_ENABLED
2121
using namespace facebook::react;
2222

23+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
24+
+ (void)load
25+
{
26+
[super load];
27+
}
28+
2329
- (instancetype)initWithFrame:(CGRect)frame
2430
{
2531
if (self = [super initWithFrame:frame]) {

apple/Elements/RNSVGForeignObject.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ @implementation RNSVGForeignObject
2323
#ifdef RCT_NEW_ARCH_ENABLED
2424
using namespace facebook::react;
2525

26+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
27+
+ (void)load
28+
{
29+
[super load];
30+
}
31+
2632
- (instancetype)initWithFrame:(CGRect)frame
2733
{
2834
if (self = [super initWithFrame:frame]) {

apple/Elements/RNSVGGroup.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ @implementation RNSVGGroup {
2525
#ifdef RCT_NEW_ARCH_ENABLED
2626
using namespace facebook::react;
2727

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

apple/Elements/RNSVGImage.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ @implementation RNSVGImage {
5050
}
5151
#ifdef RCT_NEW_ARCH_ENABLED
5252

53+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
54+
+ (void)load
55+
{
56+
[super load];
57+
}
58+
5359
- (instancetype)initWithFrame:(CGRect)frame
5460
{
5561
if (self = [super initWithFrame:frame]) {

apple/Elements/RNSVGLinearGradient.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ @implementation RNSVGLinearGradient
2222
#ifdef RCT_NEW_ARCH_ENABLED
2323
using namespace facebook::react;
2424

25+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
26+
+ (void)load
27+
{
28+
[super load];
29+
}
30+
2531
- (instancetype)initWithFrame:(CGRect)frame
2632
{
2733
if (self = [super initWithFrame:frame]) {

apple/Elements/RNSVGMarker.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ @implementation RNSVGMarker
2424
#ifdef RCT_NEW_ARCH_ENABLED
2525
using namespace facebook::react;
2626

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

apple/Elements/RNSVGMask.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ @implementation RNSVGMask
2323
#ifdef RCT_NEW_ARCH_ENABLED
2424
using namespace facebook::react;
2525

26+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
27+
+ (void)load
28+
{
29+
[super load];
30+
}
31+
2632
- (instancetype)initWithFrame:(CGRect)frame
2733
{
2834
if (self = [super initWithFrame:frame]) {

apple/Elements/RNSVGPath.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ @implementation RNSVGPath {
2323
#ifdef RCT_NEW_ARCH_ENABLED
2424
using namespace facebook::react;
2525

26+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
27+
+ (void)load
28+
{
29+
[super load];
30+
}
31+
2632
- (instancetype)initWithFrame:(CGRect)frame
2733
{
2834
if (self = [super initWithFrame:frame]) {

apple/Elements/RNSVGPattern.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ @implementation RNSVGPattern
2323
#ifdef RCT_NEW_ARCH_ENABLED
2424
using namespace facebook::react;
2525

26+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
27+
+ (void)load
28+
{
29+
[super load];
30+
}
31+
2632
- (instancetype)initWithFrame:(CGRect)frame
2733
{
2834
if (self = [super initWithFrame:frame]) {

0 commit comments

Comments
 (0)