Skip to content

Commit

Permalink
feat: add load method (#2427)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
WoLewicki authored Aug 23, 2024
1 parent a089cc2 commit 4a5674d
Show file tree
Hide file tree
Showing 26 changed files with 156 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apple/Elements/RNSVGClipPath.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ @implementation RNSVGClipPath
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGDefs.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ @implementation RNSVGDefs
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGForeignObject.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ @implementation RNSVGForeignObject
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGGroup.mm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ @implementation RNSVGGroup {
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGImage.mm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ @implementation RNSVGImage {
}
#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 apple/Elements/RNSVGLinearGradient.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ @implementation RNSVGLinearGradient
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGMarker.mm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ @implementation RNSVGMarker
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGMask.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ @implementation RNSVGMask
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGPath.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ @implementation RNSVGPath {
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGPattern.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ @implementation RNSVGPattern
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGRadialGradient.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ @implementation RNSVGRadialGradient
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGSvgView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ @implementation RNSVGSvgView {
using namespace facebook::react;
#endif // 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 apple/Elements/RNSVGSymbol.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ @implementation RNSVGSymbol
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Elements/RNSVGUse.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ @implementation RNSVGUse
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Filters/RNSVGFeColorMatrix.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ @implementation RNSVGFeColorMatrix
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Filters/RNSVGFeGaussianBlur.mm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ @implementation RNSVGFeGaussianBlur
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Filters/RNSVGFeMerge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ @implementation RNSVGFeMerge
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Filters/RNSVGFeOffset.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ @implementation RNSVGFeOffset
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Filters/RNSVGFilter.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ @implementation RNSVGFilter {
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Shapes/RNSVGCircle.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ @implementation RNSVGCircle
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Shapes/RNSVGEllipse.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ @implementation RNSVGEllipse
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Shapes/RNSVGLine.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ @implementation RNSVGLine
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Shapes/RNSVGRect.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ @implementation RNSVGRect
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Text/RNSVGTSpan.mm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ @implementation RNSVGTSpan {
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Text/RNSVGText.mm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ @implementation RNSVGText {
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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 apple/Text/RNSVGTextPath.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ @implementation RNSVGTextPath
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;

// 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

0 comments on commit 4a5674d

Please sign in to comment.