diff --git a/FabricExample/ios/Podfile.lock b/FabricExample/ios/Podfile.lock index 8132fe43c..ce20e0d79 100644 --- a/FabricExample/ios/Podfile.lock +++ b/FabricExample/ios/Podfile.lock @@ -951,7 +951,7 @@ SPEC CHECKSUMS: React-rncore: cfeb5532ec459f562410e8058b8f49e07cd215d4 React-runtimeexecutor: ac80782d9d76ba2b0f709f4de0c427fe33c352dc ReactCommon: 20e38a9be5fe1341b5e422220877cc94034776ba - RNSVG: f49e247b4ea8b56c27ac52aa92259361b202ba7e + RNSVG: 27a7d7438182ca3323de0c57695e3bdaf1aa5eb4 SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 Yoga: c618b544ff8bd8865cdca602f00cbcdb92fd6d31 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a diff --git a/RNSVG.podspec b/RNSVG.podspec index 52671f93b..afd13a189 100644 --- a/RNSVG.podspec +++ b/RNSVG.podspec @@ -24,7 +24,7 @@ Pod::Spec.new do |s| "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", } s.platforms = { ios: '11.0', tvos: '11.0' } - s.compiler_flags = folly_compiler_flags + ' -DRN_FABRIC_ENABLED' + s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED' s.source_files = 'apple/**/*.{h,m,mm,cpp}' s.ios.exclude_files = '**/*.macos.{h,m,mm,cpp}' s.tvos.exclude_files = '**/*.macos.{h,m,mm,cpp}' diff --git a/apple/Elements/RNSVGClipPath.mm b/apple/Elements/RNSVGClipPath.mm index 15a4dfc86..8b2dcf8be 100644 --- a/apple/Elements/RNSVGClipPath.mm +++ b/apple/Elements/RNSVGClipPath.mm @@ -8,17 +8,17 @@ #import "RNSVGClipPath.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGClipPath -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -48,7 +48,7 @@ - (void)prepareForRecycle { [super prepareForRecycle]; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)parseReference { @@ -70,9 +70,9 @@ - (BOOL)isSimpleClipPath @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGClipPathCls(void) { return RNSVGClipPath.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGDefs.mm b/apple/Elements/RNSVGDefs.mm index 6692ae4ae..67e905a3a 100644 --- a/apple/Elements/RNSVGDefs.mm +++ b/apple/Elements/RNSVGDefs.mm @@ -7,17 +7,17 @@ */ #import "RNSVGDefs.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGDefs -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -35,7 +35,7 @@ + (ComponentDescriptorProvider)componentDescriptorProvider { return concreteComponentDescriptorProvider(); } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)renderTo:(CGContextRef)context { @@ -60,9 +60,9 @@ - (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGDefsCls(void) { return RNSVGDefs.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGForeignObject.mm b/apple/Elements/RNSVGForeignObject.mm index efe93dc7e..8fb44c6b7 100644 --- a/apple/Elements/RNSVGForeignObject.mm +++ b/apple/Elements/RNSVGForeignObject.mm @@ -10,17 +10,17 @@ #import "RNSVGMask.h" #import "RNSVGNode.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGForeignObject -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -68,7 +68,7 @@ - (void)prepareForRecycle _foreignObjectheight = nil; _foreignObjectwidth = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { return nil; @@ -211,9 +211,9 @@ - (void)setForeignObjectheight:(RNSVGLength *)foreignObjectheight @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGForeignObjectCls(void) { return RNSVGForeignObject.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGGroup.mm b/apple/Elements/RNSVGGroup.mm index 880b0671b..17138e6dd 100644 --- a/apple/Elements/RNSVGGroup.mm +++ b/apple/Elements/RNSVGGroup.mm @@ -10,19 +10,19 @@ #import "RNSVGClipPath.h" #import "RNSVGMask.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGGroup { RNSVGGlyphContext *_glyphContext; } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -55,7 +55,7 @@ - (void)prepareForRecycle _font = nil; _glyphContext = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)setFont:(NSDictionary *)font { @@ -293,9 +293,9 @@ - (void)resetProperties @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGGroupCls(void) { return RNSVGGroup.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGImage.h b/apple/Elements/RNSVGImage.h index d930f4dab..a220e2654 100644 --- a/apple/Elements/RNSVGImage.h +++ b/apple/Elements/RNSVGImage.h @@ -15,12 +15,12 @@ #import -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #endif @interface RNSVGImage : RNSVGRenderable -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #endif diff --git a/apple/Elements/RNSVGImage.mm b/apple/Elements/RNSVGImage.mm index a348a0d0b..1b7116584 100644 --- a/apple/Elements/RNSVGImage.mm +++ b/apple/Elements/RNSVGImage.mm @@ -20,13 +20,13 @@ #import #import -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED #import #import #import "RNSVGViewBox.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import @@ -38,19 +38,19 @@ #import "RNSVGFabricConversions.h" using namespace facebook::react; -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGImage { CGImageRef _image; CGSize _imageSize; RCTImageLoaderCancellationBlock _reloadImageCancellationBlock; -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED RNSVGImageShadowNode::ConcreteState::Shared _state; RCTImageResponseObserverProxy _imageResponseObserverProxy; -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED - (instancetype)initWithFrame:(CGRect)frame { @@ -58,9 +58,7 @@ - (instancetype)initWithFrame:(CGRect)frame static const auto defaultProps = std::make_shared(); _props = defaultProps; -#ifdef RN_FABRIC_ENABLED _imageResponseObserverProxy = RCTImageResponseObserverProxy(self); -#endif } return self; } @@ -168,11 +166,11 @@ - (void)prepareForRecycle _imageSize = CGSizeZero; _reloadImageCancellationBlock = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)setSrc:(RCTImageSource *)src { -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #else if (src == _src) { return; @@ -201,7 +199,7 @@ - (void)setSrc:(RCTImageSource *)src [self invalidate]; }); }]; -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED } - (void)setX:(RNSVGLength *)x @@ -337,9 +335,9 @@ - (CGPathRef)getPath:(CGContextRef)context @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGImageCls(void) { return RNSVGImage.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGLinearGradient.mm b/apple/Elements/RNSVGLinearGradient.mm index 0d72e1988..ea891a4d4 100644 --- a/apple/Elements/RNSVGLinearGradient.mm +++ b/apple/Elements/RNSVGLinearGradient.mm @@ -9,17 +9,17 @@ #import "RNSVGBrushType.h" #import "RNSVGPainter.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGLinearGradient -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -79,7 +79,7 @@ - (void)prepareForRecycle _gradientUnits = kRNSVGUnitsObjectBoundingBox; _gradientTransform = CGAffineTransformIdentity; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (instancetype)init { @@ -177,9 +177,9 @@ - (void)parseReference } @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGLinearGradientCls(void) { return RNSVGLinearGradient.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGMarker.mm b/apple/Elements/RNSVGMarker.mm index 3d7d38e9b..b899554ac 100644 --- a/apple/Elements/RNSVGMarker.mm +++ b/apple/Elements/RNSVGMarker.mm @@ -11,17 +11,17 @@ #import "RNSVGPainter.h" #import "RNSVGViewBox.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGMarker -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -79,7 +79,7 @@ - (void)prepareForRecycle _align = nil; _meetOrSlice = kRNSVGVBMOSMeet; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { @@ -271,9 +271,9 @@ - (void)renderMarker:(CGContextRef)context @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGMarkerCls(void) { return RNSVGMarker.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGMask.mm b/apple/Elements/RNSVGMask.mm index e8381854b..f80a8e9cb 100644 --- a/apple/Elements/RNSVGMask.mm +++ b/apple/Elements/RNSVGMask.mm @@ -10,17 +10,17 @@ #import "RNSVGNode.h" #import "RNSVGPainter.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGMask -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -68,7 +68,7 @@ - (void)prepareForRecycle _maskUnits = kRNSVGUnitsObjectBoundingBox; _maskContentUnits = kRNSVGUnitsObjectBoundingBox; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { @@ -143,9 +143,9 @@ - (void)setMaskContentUnits:(RNSVGUnits)maskContentUnits @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGMaskCls(void) { return RNSVGMask.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGPath.mm b/apple/Elements/RNSVGPath.mm index 6e8293414..1bc92f17d 100644 --- a/apple/Elements/RNSVGPath.mm +++ b/apple/Elements/RNSVGPath.mm @@ -8,19 +8,19 @@ #import "RNSVGPath.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGPath { CGPathRef _path; } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -57,7 +57,7 @@ - (void)prepareForRecycle _path = nil; _d = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)setD:(RNSVGPathParser *)d { @@ -83,9 +83,9 @@ - (void)dealloc @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGPathCls(void) { return RNSVGPath.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGPattern.mm b/apple/Elements/RNSVGPattern.mm index 663630e9d..0c6ff0aca 100644 --- a/apple/Elements/RNSVGPattern.mm +++ b/apple/Elements/RNSVGPattern.mm @@ -10,17 +10,17 @@ #import "RNSVGNode.h" #import "RNSVGPainter.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGPattern -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -92,7 +92,7 @@ - (void)prepareForRecycle _align = nil; _meetOrSlice = kRNSVGVBMOSMeet; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (instancetype)init { @@ -252,9 +252,9 @@ - (void)setMeetOrSlice:(RNSVGVBMOS)meetOrSlice @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGPatternCls(void) { return RNSVGPattern.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGRadialGradient.mm b/apple/Elements/RNSVGRadialGradient.mm index 3865aa548..d7ed4afb8 100644 --- a/apple/Elements/RNSVGRadialGradient.mm +++ b/apple/Elements/RNSVGRadialGradient.mm @@ -7,17 +7,17 @@ */ #import "RNSVGRadialGradient.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGRadialGradient -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -81,7 +81,7 @@ - (void)prepareForRecycle _gradientUnits = kRNSVGUnitsObjectBoundingBox; _gradientTransform = CGAffineTransformIdentity; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (instancetype)init { if (self = [super init]) { @@ -199,9 +199,9 @@ - (void)parseReference @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGRadialGradientCls(void) { return RNSVGRadialGradient.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGSvgView.h b/apple/Elements/RNSVGSvgView.h index 0af632369..d3c88ffd1 100644 --- a/apple/Elements/RNSVGSvgView.h +++ b/apple/Elements/RNSVGSvgView.h @@ -12,18 +12,18 @@ #import "RNSVGPainter.h" #import "RNSVGVBMOS.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @class RNSVGNode; @interface RNSVGSvgView : -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED RCTViewComponentView #else RNSVGView -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @property (nonatomic, strong) RNSVGLength *bbWidth; @property (nonatomic, strong) RNSVGLength *bbHeight; diff --git a/apple/Elements/RNSVGSvgView.mm b/apple/Elements/RNSVGSvgView.mm index fc1b64786..9306b046f 100644 --- a/apple/Elements/RNSVGSvgView.mm +++ b/apple/Elements/RNSVGSvgView.mm @@ -11,13 +11,13 @@ #import "RNSVGNode.h" #import "RNSVGViewBox.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGSvgView { NSMutableDictionary *_clipPaths; @@ -29,9 +29,9 @@ @implementation RNSVGSvgView { bool rendered; } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (instancetype)initWithFrame:(CGRect)frame { @@ -42,17 +42,17 @@ - (instancetype)initWithFrame:(CGRect)frame self.contentMode = UIViewContentModeRedraw; #endif // TARGET_OS_OSX rendered = false; -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED static const auto defaultProps = std::make_shared(); _props = defaultProps; // TODO: think if we can do it better self.opaque = NO; -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED } return self; } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #pragma mark - RCTComponentViewProtocol + (ComponentDescriptorProvider)componentDescriptorProvider @@ -108,7 +108,7 @@ - (void)prepareForRecycle _invviewBoxTransform = CGAffineTransformIdentity; rendered = NO; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)insertReactSubview:(RNSVGView *)subview atIndex:(NSInteger)atIndex { @@ -427,9 +427,9 @@ - (CGAffineTransform)getViewBoxTransform @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGSvgViewCls(void) { return RNSVGSvgView.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGSymbol.mm b/apple/Elements/RNSVGSymbol.mm index 4fef56d6a..a81bc3945 100644 --- a/apple/Elements/RNSVGSymbol.mm +++ b/apple/Elements/RNSVGSymbol.mm @@ -8,17 +8,17 @@ #import "RNSVGSymbol.h" #import "RNSVGViewBox.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGSymbol -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -63,7 +63,7 @@ - (void)prepareForRecycle _align = nil; _meetOrSlice = kRNSVGVBMOSMeet; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)setMinX:(CGFloat)minX { @@ -148,9 +148,9 @@ - (void)renderSymbolTo:(CGContextRef)context width:(CGFloat)width height:(CGFloa @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGSymbolCls(void) { return RNSVGSymbol.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Elements/RNSVGUse.mm b/apple/Elements/RNSVGUse.mm index 15b3d4960..d0485b7bb 100644 --- a/apple/Elements/RNSVGUse.mm +++ b/apple/Elements/RNSVGUse.mm @@ -9,17 +9,17 @@ #import #import "RNSVGSymbol.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGUse -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -65,7 +65,7 @@ - (void)prepareForRecycle _usewidth = nil; _href = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)setHref:(NSString *)href { @@ -204,9 +204,9 @@ - (CGPathRef)getPath:(CGContextRef)context @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGUseCls(void) { return RNSVGUse.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/RNSVGNode.h b/apple/RNSVGNode.h index e5e9d7297..3c65e102e 100644 --- a/apple/RNSVGNode.h +++ b/apple/RNSVGNode.h @@ -12,9 +12,9 @@ #import #import -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @class RNSVGGroup; @@ -24,11 +24,11 @@ */ @interface RNSVGNode : -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED RCTViewComponentView #else RNSVGView -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED /* N[1/Sqrt[2], 36] The inverse of the square root of 2. diff --git a/apple/RNSVGNode.mm b/apple/RNSVGNode.mm index f3479be99..37a023f72 100644 --- a/apple/RNSVGNode.mm +++ b/apple/RNSVGNode.mm @@ -590,7 +590,7 @@ - (void)dealloc CGPathRelease(_path); } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED - (void)prepareForRecycle { [super prepareForRecycle]; @@ -652,6 +652,6 @@ - (void)prepareForRecycle CGPathRelease(_path); _path = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @end diff --git a/apple/RNSVGRenderable.mm b/apple/RNSVGRenderable.mm index 4ac4fe14a..d69b97452 100644 --- a/apple/RNSVGRenderable.mm +++ b/apple/RNSVGRenderable.mm @@ -185,7 +185,7 @@ - (void)dealloc _strokeDashArrayData = nil; } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED - (void)prepareForRecycle { [super prepareForRecycle]; @@ -220,7 +220,7 @@ - (void)prepareForRecycle _vectorEffect = kRNSVGVectorEffectDefault; _propList = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED UInt32 saturate(CGFloat value) { diff --git a/apple/RNSVGRenderableModule.h b/apple/RNSVGRenderableModule.h index bfce47781..478ecf626 100644 --- a/apple/RNSVGRenderableModule.h +++ b/apple/RNSVGRenderableModule.h @@ -6,14 +6,14 @@ * LICENSE file in the root directory of this source tree. */ -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #else #import #endif @interface RNSVGRenderableModule : NSObject -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #else diff --git a/apple/RNSVGRenderableModule.mm b/apple/RNSVGRenderableModule.mm index de2446e8a..f6af102b3 100644 --- a/apple/RNSVGRenderableModule.mm +++ b/apple/RNSVGRenderableModule.mm @@ -20,9 +20,9 @@ @implementation RNSVGRenderableModule RCT_EXPORT_MODULE() -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @synthesize bridge = _bridge; RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(isPointInFill : (nonnull NSNumber *)reactTag options : (NSDictionary *)options) @@ -196,7 +196,7 @@ - (void)getRawResource:(NSString *)name resolve:(RCTPromiseResolveBlock)resolve - (RNSVGPlatformView *)getRenderableView:(NSNumber *)reactTag { __block RNSVGPlatformView *view; -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED dispatch_sync(dispatch_get_main_queue(), ^{ view = [self.viewRegistry_DEPRECATED viewForReactTag:reactTag]; }); @@ -204,11 +204,11 @@ - (RNSVGPlatformView *)getRenderableView:(NSNumber *)reactTag dispatch_sync(dispatch_get_main_queue(), ^{ view = [self.bridge.uiManager viewForReactTag:reactTag]; }); -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED return view; } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { diff --git a/apple/RNSVGSvgViewModule.h b/apple/RNSVGSvgViewModule.h index aa77b2e5e..85b2f0fa3 100644 --- a/apple/RNSVGSvgViewModule.h +++ b/apple/RNSVGSvgViewModule.h @@ -6,14 +6,14 @@ * LICENSE file in the root directory of this source tree. */ -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #else #import #endif @interface RNSVGSvgViewModule : NSObject -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #else diff --git a/apple/RNSVGSvgViewModule.mm b/apple/RNSVGSvgViewModule.mm index 52e770ff4..231940e7d 100644 --- a/apple/RNSVGSvgViewModule.mm +++ b/apple/RNSVGSvgViewModule.mm @@ -16,9 +16,9 @@ @implementation RNSVGSvgViewModule RCT_EXPORT_MODULE() -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @synthesize bridge = _bridge; - (void)toDataURL:(nonnull NSNumber *)reactTag @@ -27,14 +27,14 @@ - (void)toDataURL:(nonnull NSNumber *)reactTag attempt:(int)attempt { void (^block)(void) = ^{ -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED [self.viewRegistry_DEPRECATED addUIBlock:^(RCTViewRegistry *viewRegistry) { __kindof RNSVGPlatformView *view = [viewRegistry viewForReactTag:reactTag]; #else [self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary *viewRegistry) { __kindof RNSVGPlatformView *view = [uiManager viewForReactTag:reactTag]; -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED NSString *b64; if ([view isKindOfClass:[RNSVGSvgView class]]) { RNSVGSvgView *svg = view; @@ -83,7 +83,7 @@ - (void)toDataURL:(nonnull NSNumber *)reactTag [self toDataURL:reactTag options:options callback:callback attempt:0]; } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { diff --git a/apple/Shapes/RNSVGCircle.mm b/apple/Shapes/RNSVGCircle.mm index 3040ae9d5..f92960beb 100644 --- a/apple/Shapes/RNSVGCircle.mm +++ b/apple/Shapes/RNSVGCircle.mm @@ -9,17 +9,17 @@ #import "RNSVGCircle.h" #import -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGCircle -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -57,7 +57,7 @@ - (void)prepareForRecycle _cy = nil; _r = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)setCx:(RNSVGLength *)cx { @@ -98,9 +98,9 @@ - (CGPathRef)getPath:(CGContextRef)context @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGCircleCls(void) { return RNSVGCircle.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Shapes/RNSVGEllipse.mm b/apple/Shapes/RNSVGEllipse.mm index 3b627e3aa..05ebf3d62 100644 --- a/apple/Shapes/RNSVGEllipse.mm +++ b/apple/Shapes/RNSVGEllipse.mm @@ -9,17 +9,17 @@ #import "RNSVGEllipse.h" #import -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGEllipse -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -59,7 +59,7 @@ - (void)prepareForRecycle _rx = nil; _ry = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)setCx:(RNSVGLength *)cx { @@ -110,9 +110,9 @@ - (CGPathRef)getPath:(CGContextRef)context @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGEllipseCls(void) { return RNSVGEllipse.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Shapes/RNSVGLine.mm b/apple/Shapes/RNSVGLine.mm index 542ed0477..789cdc523 100644 --- a/apple/Shapes/RNSVGLine.mm +++ b/apple/Shapes/RNSVGLine.mm @@ -9,17 +9,17 @@ #import "RNSVGLine.h" #import -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGLine -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -59,7 +59,7 @@ - (void)prepareForRecycle _x2 = nil; _y2 = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)setX1:(RNSVGLength *)x1 { @@ -112,9 +112,9 @@ - (CGPathRef)getPath:(CGContextRef)context @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGLineCls(void) { return RNSVGLine.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Shapes/RNSVGRect.mm b/apple/Shapes/RNSVGRect.mm index 7ee4e0ba1..bfc6833d5 100644 --- a/apple/Shapes/RNSVGRect.mm +++ b/apple/Shapes/RNSVGRect.mm @@ -9,17 +9,17 @@ #import "RNSVGRect.h" #import -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGRect -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -69,7 +69,7 @@ - (void)prepareForRecycle _ry = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)setX:(RNSVGLength *)x { @@ -165,9 +165,9 @@ - (CGPathRef)getPath:(CGContextRef)context @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGRectCls(void) { return RNSVGRect.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Text/RNSVGTSpan.mm b/apple/Text/RNSVGTSpan.mm index 64722dfba..a2fee5f95 100644 --- a/apple/Text/RNSVGTSpan.mm +++ b/apple/Text/RNSVGTSpan.mm @@ -17,13 +17,13 @@ static NSCharacterSet *RNSVGTSpan_separators = nil; static CGFloat RNSVGTSpan_radToDeg = 180 / (CGFloat)M_PI; -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGTSpan { CGFloat startOffset; @@ -37,7 +37,7 @@ @implementation RNSVGTSpan { RNSVGPathMeasure *measure; } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -88,7 +88,7 @@ - (void)prepareForRecycle measure = [[RNSVGPathMeasure alloc] init]; RNSVGTSpan_separators = [NSCharacterSet whitespaceCharacterSet]; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (id)init { @@ -1117,9 +1117,9 @@ - (void)setupTextPath:(CGContextRef)context @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGTSpanCls(void) { return RNSVGTSpan.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Text/RNSVGText.mm b/apple/Text/RNSVGText.mm index 5f789149a..311914144 100644 --- a/apple/Text/RNSVGText.mm +++ b/apple/Text/RNSVGText.mm @@ -13,13 +13,13 @@ #import "RNSVGTextPath.h" #import "RNSVGTextProperties.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGText { RNSVGGlyphContext *_glyphContext; @@ -28,7 +28,7 @@ @implementation RNSVGText { CGFloat cachedAdvance; } -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -75,7 +75,7 @@ - (void)prepareForRecycle _baselineShift = nil; cachedAdvance = 0; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)invalidate { @@ -357,9 +357,9 @@ - (CGFloat)getSubtreeTextChunksTotalAdvance @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGTextCls(void) { return RNSVGText.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED diff --git a/apple/Text/RNSVGTextPath.mm b/apple/Text/RNSVGTextPath.mm index 443d07a4f..a7cc4e621 100644 --- a/apple/Text/RNSVGTextPath.mm +++ b/apple/Text/RNSVGTextPath.mm @@ -8,17 +8,17 @@ #import "RNSVGTextPath.h" -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED #import #import #import #import #import "RNSVGFabricConversions.h" -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED @implementation RNSVGTextPath -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED using namespace facebook::react; - (instancetype)initWithFrame:(CGRect)frame @@ -63,7 +63,7 @@ - (void)prepareForRecycle _spacing = nil; _startOffset = nil; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED - (void)setHref:(NSString *)href { @@ -141,9 +141,9 @@ - (void)popGlyphContext @end -#ifdef RN_FABRIC_ENABLED +#ifdef RCT_NEW_ARCH_ENABLED Class RNSVGTextPathCls(void) { return RNSVGTextPath.class; } -#endif // RN_FABRIC_ENABLED +#endif // RCT_NEW_ARCH_ENABLED