diff --git a/ios/RNMBX/Bridge/RNMBX.h b/ios/RNMBX/Bridge/RNMBX.h index 56185b9707..947d14359e 100644 --- a/ios/RNMBX/Bridge/RNMBX.h +++ b/ios/RNMBX/Bridge/RNMBX.h @@ -1,6 +1,5 @@ /* Those will be available for Swift */ #import -#import #import #import diff --git a/ios/RNMBX/RNMBXAtmosphereComponentView.h b/ios/RNMBX/RNMBXAtmosphereComponentView.h index 588575069a..2eb30c45b1 100644 --- a/ios/RNMBX/RNMBXAtmosphereComponentView.h +++ b/ios/RNMBX/RNMBXAtmosphereComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXAtmosphereComponentView.mm b/ios/RNMBX/RNMBXAtmosphereComponentView.mm index 63fc5d539f..7eea4dcf48 100644 --- a/ios/RNMBX/RNMBXAtmosphereComponentView.mm +++ b/ios/RNMBX/RNMBXAtmosphereComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXAtmosphereComponentView.h" #import "RNMBXFabricHelpers.h" @@ -79,4 +78,3 @@ - (void)prepareForRecycle return RNMBXAtmosphereComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXAtmosphereViewManager.m b/ios/RNMBX/RNMBXAtmosphereViewManager.m deleted file mode 100644 index 3965eb7c41..0000000000 --- a/ios/RNMBX/RNMBXAtmosphereViewManager.m +++ /dev/null @@ -1,8 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXAtmosphere, RNMBXAtmosphereViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(reactStyle, NSDictionary); - -@end diff --git a/ios/RNMBX/RNMBXAtmosphereViewManager.swift b/ios/RNMBX/RNMBXAtmosphereViewManager.swift deleted file mode 100644 index 5cfa1bea87..0000000000 --- a/ios/RNMBX/RNMBXAtmosphereViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXAtmosphereViewManager) -class RNMBXAtmosphereViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let atmosphere = RNMBXAtmosphere() - //atmosphere.bridge = self.bridge - return atmosphere - } -} diff --git a/ios/RNMBX/RNMBXBackgroundLayerComponentView.h b/ios/RNMBX/RNMBXBackgroundLayerComponentView.h index 378ec383e8..39fafc4bf5 100644 --- a/ios/RNMBX/RNMBXBackgroundLayerComponentView.h +++ b/ios/RNMBX/RNMBXBackgroundLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXBackgroundLayerComponentView.mm b/ios/RNMBX/RNMBXBackgroundLayerComponentView.mm index 1bb49fcccc..f3fc7f14b0 100644 --- a/ios/RNMBX/RNMBXBackgroundLayerComponentView.mm +++ b/ios/RNMBX/RNMBXBackgroundLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXBackgroundLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -74,4 +73,3 @@ - (void)prepareForRecycle return RNMBXBackgroundLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXBackgroundLayerViewManager.m b/ios/RNMBX/RNMBXBackgroundLayerViewManager.m deleted file mode 100644 index cc6cd314a9..0000000000 --- a/ios/RNMBX/RNMBXBackgroundLayerViewManager.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXBackgroundLayer, RNMBXBackgroundLayerViewManager, RCTViewManager) - -// standard layer props -#include "CommonLayerProperties.H" - -@end diff --git a/ios/RNMBX/RNMBXBackgroundLayerViewManager.swift b/ios/RNMBX/RNMBXBackgroundLayerViewManager.swift deleted file mode 100644 index 271bf0c728..0000000000 --- a/ios/RNMBX/RNMBXBackgroundLayerViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXBackgroundLayerViewManager) -class RNMBXBackgroundLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXBackgroundLayer() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXCalloutComponentView.h b/ios/RNMBX/RNMBXCalloutComponentView.h index 340e639bde..23e6c012e5 100644 --- a/ios/RNMBX/RNMBXCalloutComponentView.h +++ b/ios/RNMBX/RNMBXCalloutComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXCalloutComponentView.mm b/ios/RNMBX/RNMBXCalloutComponentView.mm index 83e6642a74..69fc9241a6 100644 --- a/ios/RNMBX/RNMBXCalloutComponentView.mm +++ b/ios/RNMBX/RNMBXCalloutComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXCalloutComponentView.h" #import "RNMBXFabricHelpers.h" @@ -60,4 +59,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXCalloutComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXCalloutViewManager.m b/ios/RNMBX/RNMBXCalloutViewManager.m deleted file mode 100644 index 62205d5b75..0000000000 --- a/ios/RNMBX/RNMBXCalloutViewManager.m +++ /dev/null @@ -1,8 +0,0 @@ -#import "React/RCTBridgeModule.h" -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXCallout, RNMBXCalloutViewManager, RCTViewManager) - -@end - diff --git a/ios/RNMBX/RNMBXCalloutViewManager.swift b/ios/RNMBX/RNMBXCalloutViewManager.swift deleted file mode 100644 index bc74e3af31..0000000000 --- a/ios/RNMBX/RNMBXCalloutViewManager.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Foundation -import MapboxMaps - -@objc(RNMBXCalloutViewManager) -class RNMBXCalloutViewManager : RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - return RNMBXCallout() - } -} diff --git a/ios/RNMBX/RNMBXCameraComponentView.h b/ios/RNMBX/RNMBXCameraComponentView.h index 809c5b3940..d1a7819f4d 100644 --- a/ios/RNMBX/RNMBXCameraComponentView.h +++ b/ios/RNMBX/RNMBXCameraComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXCameraComponentView.mm b/ios/RNMBX/RNMBXCameraComponentView.mm index abc8b4a904..a1a6596127 100644 --- a/ios/RNMBX/RNMBXCameraComponentView.mm +++ b/ios/RNMBX/RNMBXCameraComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXCameraComponentView.h" #import "RNMBXFabricHelpers.h" @@ -148,4 +147,3 @@ - (void)prepareForRecycle return RNMBXCameraComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXCameraGestureObserverComponentView.h b/ios/RNMBX/RNMBXCameraGestureObserverComponentView.h index 3dbe912522..a4aeb5f53f 100644 --- a/ios/RNMBX/RNMBXCameraGestureObserverComponentView.h +++ b/ios/RNMBX/RNMBXCameraGestureObserverComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXCameraGestureObserverComponentView.mm b/ios/RNMBX/RNMBXCameraGestureObserverComponentView.mm index 9a8a2ec07e..7f017b0160 100644 --- a/ios/RNMBX/RNMBXCameraGestureObserverComponentView.mm +++ b/ios/RNMBX/RNMBXCameraGestureObserverComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXCameraGestureObserverComponentView.h" #import "RNMBXFabricHelpers.h" @@ -116,4 +115,3 @@ - (void)prepareForRecycle return RNMBXCameraGestureObserverComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXCameraModule.h b/ios/RNMBX/RNMBXCameraModule.h index 7d59deeb6f..3034c4db75 100644 --- a/ios/RNMBX/RNMBXCameraModule.h +++ b/ios/RNMBX/RNMBXCameraModule.h @@ -2,18 +2,9 @@ #import #import "RNMBXViewResolver.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps_specs.h" -#else -#import -#endif -@interface RNMBXCameraModule : NSObject -#ifdef RCT_NEW_ARCH_ENABLED - -#else - -#endif +@interface RNMBXCameraModule : NSObject @end diff --git a/ios/RNMBX/RNMBXCameraModule.mm b/ios/RNMBX/RNMBXCameraModule.mm index 356e853905..e68b7e80b3 100644 --- a/ios/RNMBX/RNMBXCameraModule.mm +++ b/ios/RNMBX/RNMBXCameraModule.mm @@ -3,9 +3,7 @@ #import #import "RNMBXCameraModule.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXCameraComponentView.h" -#endif // RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps-Swift.pre.h" @@ -13,9 +11,7 @@ @implementation RNMBXCameraModule RCT_EXPORT_MODULE(); -#ifdef RCT_NEW_ARCH_ENABLED @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; -#endif // RCT_NEW_ARCH_ENABLED @synthesize bridge = _bridge; - (dispatch_queue_t)methodQueue @@ -25,14 +21,11 @@ - (dispatch_queue_t)methodQueue return RCTGetUIManagerQueue(); } -// Thanks to this guard, we won't compile this code when we build for the old architecture. -#ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { return std::make_shared(params); } -#endif // RCT_NEW_ARCH_ENABLED - (void)withCamera:(nonnull NSNumber*)viewRef block:(void (^)(RNMBXCamera *))block reject:(RCTPromiseRejectBlock)reject methodName:(NSString *)methodName { diff --git a/ios/RNMBX/RNMBXCameraViewManager.m b/ios/RNMBX/RNMBXCameraViewManager.m deleted file mode 100644 index 70027938e4..0000000000 --- a/ios/RNMBX/RNMBXCameraViewManager.m +++ /dev/null @@ -1,27 +0,0 @@ -#if !RCT_NEW_ARCH_ENABLED - -#import "React/RCTBridgeModule.h" -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXCamera, RNMBXCameraViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(maxBounds, NSString) -RCT_EXPORT_VIEW_PROPERTY(animationDuration, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(animationMode, NSString) -RCT_EXPORT_VIEW_PROPERTY(defaultStop, NSDictionary) - -RCT_EXPORT_VIEW_PROPERTY(followUserLocation, BOOL) -RCT_EXPORT_VIEW_PROPERTY(followUserMode, NSString) -RCT_EXPORT_VIEW_PROPERTY(followZoomLevel, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(followPitch, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(followHeading, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(followPadding, NSDictionary) - -RCT_EXPORT_VIEW_PROPERTY(maxZoomLevel, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(minZoomLevel, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(onUserTrackingModeChange, RCTBubblingEventBlock) -RCT_EXPORT_VIEW_PROPERTY(stop, NSDictionary) - -@end -#endif diff --git a/ios/RNMBX/RNMBXCameraViewManager.swift b/ios/RNMBX/RNMBXCameraViewManager.swift deleted file mode 100644 index 2f5fc06a76..0000000000 --- a/ios/RNMBX/RNMBXCameraViewManager.swift +++ /dev/null @@ -1,16 +0,0 @@ -#if !RCT_NEW_ARCH_ENABLED - import Foundation - import MapboxMaps - - @objc(RNMBXCameraViewManager) - class RNMBXCameraViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - return RNMBXCamera() - } - } -#endif diff --git a/ios/RNMBX/RNMBXCircleLayerComponentView.h b/ios/RNMBX/RNMBXCircleLayerComponentView.h index 066944a7e5..0501a9e23d 100644 --- a/ios/RNMBX/RNMBXCircleLayerComponentView.h +++ b/ios/RNMBX/RNMBXCircleLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXCircleLayerComponentView.mm b/ios/RNMBX/RNMBXCircleLayerComponentView.mm index 556a5047d3..909a831139 100644 --- a/ios/RNMBX/RNMBXCircleLayerComponentView.mm +++ b/ios/RNMBX/RNMBXCircleLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXCircleLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -73,4 +72,3 @@ - (void)prepareForRecycle return RNMBXCircleLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXCircleLayerViewManager.m b/ios/RNMBX/RNMBXCircleLayerViewManager.m deleted file mode 100644 index 81f8512e77..0000000000 --- a/ios/RNMBX/RNMBXCircleLayerViewManager.m +++ /dev/null @@ -1,14 +0,0 @@ -#if !RCT_NEW_ARCH_ENABLED -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXCircleLayer, RNMBXCircleLayerViewManager, RCTViewManager) - -// circle layer props -RCT_EXPORT_VIEW_PROPERTY(sourceLayerID, NSString) - -// standard layer props -#include "CommonLayerProperties.H" - -@end -#endif diff --git a/ios/RNMBX/RNMBXCircleLayerViewManager.swift b/ios/RNMBX/RNMBXCircleLayerViewManager.swift deleted file mode 100644 index 9c37472547..0000000000 --- a/ios/RNMBX/RNMBXCircleLayerViewManager.swift +++ /dev/null @@ -1,15 +0,0 @@ -#if !RCT_NEW_ARCH_ENABLED -@objc(RNMBXCircleLayerViewManager) -class RNMBXCircleLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXCircleLayer() - layer.bridge = self.bridge - return layer - } -} -#endif diff --git a/ios/RNMBX/RNMBXCustomLocationProviderComponentView.h b/ios/RNMBX/RNMBXCustomLocationProviderComponentView.h index c5bfc36fb9..bf77e3d9bd 100644 --- a/ios/RNMBX/RNMBXCustomLocationProviderComponentView.h +++ b/ios/RNMBX/RNMBXCustomLocationProviderComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXCustomLocationProviderComponentView.mm b/ios/RNMBX/RNMBXCustomLocationProviderComponentView.mm index df320e0c4c..30f2eef40d 100644 --- a/ios/RNMBX/RNMBXCustomLocationProviderComponentView.mm +++ b/ios/RNMBX/RNMBXCustomLocationProviderComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXCustomLocationProviderComponentView.h" #import "RNMBXFabricHelpers.h" @@ -80,4 +79,3 @@ - (void)prepareForRecycle return RNMBXCustomLocationProviderComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXCustomLocationProviderVIewManager.swift b/ios/RNMBX/RNMBXCustomLocationProviderVIewManager.swift deleted file mode 100644 index d6fe1ffc1b..0000000000 --- a/ios/RNMBX/RNMBXCustomLocationProviderVIewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXCustomLocationProviderViewManager) -class RNMBXCustomLocationProviderViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXCustomLocationProvider() - //layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXCustomLocationProviderViewManager.m b/ios/RNMBX/RNMBXCustomLocationProviderViewManager.m deleted file mode 100644 index 87ceaa89f3..0000000000 --- a/ios/RNMBX/RNMBXCustomLocationProviderViewManager.m +++ /dev/null @@ -1,10 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXCustomLocationProvider, RNMBXCustomLocationProviderViewManager, RCTViewManager) - -// circle layer props -RCT_EXPORT_VIEW_PROPERTY(coordinate, NSArray) -RCT_EXPORT_VIEW_PROPERTY(heading, NSNumber) - -@end diff --git a/ios/RNMBX/RNMBXFabricPropConvert.mm b/ios/RNMBX/RNMBXFabricPropConvert.mm index 025c29db6d..8762b37b5e 100644 --- a/ios/RNMBX/RNMBXFabricPropConvert.mm +++ b/ios/RNMBX/RNMBXFabricPropConvert.mm @@ -1,5 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED - #import #import #import @@ -156,5 +154,3 @@ id RNMBXPropConvert_Optional_ExpressionDouble(const folly::dynamic &dyn, NSStrin NSArray * RNMBXPropConvert_Optional_NumberArray(const folly::dynamic &dyn, NSString* propertyName) { return RNMBXPropConvert_ID(dyn); } - -#endif diff --git a/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.h b/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.h index 06e9a297a9..d139c6ef72 100644 --- a/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.h +++ b/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm b/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm index 99a6b9019c..176699039e 100644 --- a/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm +++ b/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXFillExtrusionLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -74,4 +73,3 @@ - (void)prepareForRecycle return RNMBXFillExtrusionLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXFillExtrusionLayerViewManager.m b/ios/RNMBX/RNMBXFillExtrusionLayerViewManager.m deleted file mode 100644 index 2ed9a38ed2..0000000000 --- a/ios/RNMBX/RNMBXFillExtrusionLayerViewManager.m +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXFillExtrusionLayer, RNMBXFillExtrusionLayerViewManager, RCTViewManager) - -// fill extrusion layer props -RCT_EXPORT_VIEW_PROPERTY(sourceLayerID, NSString) - -// standard layer props -#include "CommonLayerProperties.H" - -@end diff --git a/ios/RNMBX/RNMBXFillExtrusionLayerViewManager.swift b/ios/RNMBX/RNMBXFillExtrusionLayerViewManager.swift deleted file mode 100644 index 92ce746dac..0000000000 --- a/ios/RNMBX/RNMBXFillExtrusionLayerViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXFillExtrusionLayerViewManager) -class RNMBXFillExtrusionLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXFillExtrusionLayer() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXFillLayerComponentView.h b/ios/RNMBX/RNMBXFillLayerComponentView.h index 24b0e3c4d4..1f44fda36d 100644 --- a/ios/RNMBX/RNMBXFillLayerComponentView.h +++ b/ios/RNMBX/RNMBXFillLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXFillLayerComponentView.mm b/ios/RNMBX/RNMBXFillLayerComponentView.mm index c70f0afe28..e081e226a2 100644 --- a/ios/RNMBX/RNMBXFillLayerComponentView.mm +++ b/ios/RNMBX/RNMBXFillLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXFillLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -73,4 +72,3 @@ - (void)prepareForRecycle return RNMBXFillLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXFillLayerViewManager.m b/ios/RNMBX/RNMBXFillLayerViewManager.m deleted file mode 100644 index 30608a5e8d..0000000000 --- a/ios/RNMBX/RNMBXFillLayerViewManager.m +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXFillLayer, RNMBXFillLayerViewManager, RCTViewManager) - -// circle layer props -RCT_EXPORT_VIEW_PROPERTY(sourceLayerID, NSString) - -// standard layer props -#include "CommonLayerProperties.H" - -@end diff --git a/ios/RNMBX/RNMBXFillLayerViewManager.swift b/ios/RNMBX/RNMBXFillLayerViewManager.swift deleted file mode 100644 index 4f36c59a2c..0000000000 --- a/ios/RNMBX/RNMBXFillLayerViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXFillLayerViewManager) -class RNMBXFillLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXFillLayer() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXHeatmapLayerComponentView.h b/ios/RNMBX/RNMBXHeatmapLayerComponentView.h index edbce57898..c894169da2 100644 --- a/ios/RNMBX/RNMBXHeatmapLayerComponentView.h +++ b/ios/RNMBX/RNMBXHeatmapLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXHeatmapLayerComponentView.mm b/ios/RNMBX/RNMBXHeatmapLayerComponentView.mm index d453992b3b..25c2dd73c4 100644 --- a/ios/RNMBX/RNMBXHeatmapLayerComponentView.mm +++ b/ios/RNMBX/RNMBXHeatmapLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXHeatmapLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -73,4 +72,3 @@ - (void)prepareForRecycle return RNMBXHeatmapLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXHeatmapLayerViewManager.m b/ios/RNMBX/RNMBXHeatmapLayerViewManager.m deleted file mode 100644 index 2972f0c59d..0000000000 --- a/ios/RNMBX/RNMBXHeatmapLayerViewManager.m +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXHeatmapLayer, RNMBXHeatmapLayerViewManager, RCTViewManager) - -// circle layer props -RCT_EXPORT_VIEW_PROPERTY(sourceLayerID, NSString) - -// standard layer props -#include "CommonLayerProperties.H" - -@end diff --git a/ios/RNMBX/RNMBXHeatmapLayerViewManager.swift b/ios/RNMBX/RNMBXHeatmapLayerViewManager.swift deleted file mode 100644 index ae517e2444..0000000000 --- a/ios/RNMBX/RNMBXHeatmapLayerViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXHeatmapLayerViewManager) -class RNMBXHeatmapLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXHeatmapLayer() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXImageComponentView.h b/ios/RNMBX/RNMBXImageComponentView.h index 1df1363634..2fdd4617e9 100644 --- a/ios/RNMBX/RNMBXImageComponentView.h +++ b/ios/RNMBX/RNMBXImageComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXImageComponentView.mm b/ios/RNMBX/RNMBXImageComponentView.mm index 52d5630bc5..ff9ab8c3ce 100644 --- a/ios/RNMBX/RNMBXImageComponentView.mm +++ b/ios/RNMBX/RNMBXImageComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXImageComponentView.h" #import "RNMBXFabricHelpers.h" @@ -102,4 +101,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXImageComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXImageManager.m b/ios/RNMBX/RNMBXImageManager.m deleted file mode 100644 index 0dd80b091c..0000000000 --- a/ios/RNMBX/RNMBXImageManager.m +++ /dev/null @@ -1,30 +0,0 @@ -#import -#import - - -@interface RCTConvert (NSNumberArrayArray) - -+ (NSArray*> *)NSNumberArrayArray:(id)json; - -@end - -@implementation RCTConvert (NSNumberArrayArray) - -+(NSArray*> *)NSNumberArrayArray : (id)json RCT_DYNAMIC -{ - return json; -} - -@end - - -@interface RCT_EXTERN_MODULE(RNMBXImageManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(stretchX, NSArray>) -RCT_EXPORT_VIEW_PROPERTY(stretchY, NSArray>) -RCT_EXPORT_VIEW_PROPERTY(content, NSArray) -RCT_EXPORT_VIEW_PROPERTY(sdf, BOOL) -RCT_EXPORT_VIEW_PROPERTY(name, NSString) - -@end - diff --git a/ios/RNMBX/RNMBXImageManager.swift b/ios/RNMBX/RNMBXImageManager.swift deleted file mode 100644 index ffa4b3e966..0000000000 --- a/ios/RNMBX/RNMBXImageManager.swift +++ /dev/null @@ -1,13 +0,0 @@ - -@objc(RNMBXImageManager) -class RNMBXImageManager : RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXImage() - return layer - } -} diff --git a/ios/RNMBX/RNMBXImageModule.h b/ios/RNMBX/RNMBXImageModule.h index 2710488108..b1bd37017b 100644 --- a/ios/RNMBX/RNMBXImageModule.h +++ b/ios/RNMBX/RNMBXImageModule.h @@ -2,17 +2,8 @@ #import #import "RNMBXViewResolver.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps_specs.h" -#else -#import -#endif -@interface RNMBXImageModule : NSObject -#ifdef RCT_NEW_ARCH_ENABLED - -#else - -#endif +@interface RNMBXImageModule : NSObject @end diff --git a/ios/RNMBX/RNMBXImageModule.mm b/ios/RNMBX/RNMBXImageModule.mm index 677b22a428..e21b4ff216 100644 --- a/ios/RNMBX/RNMBXImageModule.mm +++ b/ios/RNMBX/RNMBXImageModule.mm @@ -3,9 +3,7 @@ #import #import "RNMBXImageModule.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXImageComponentView.h" -#endif // RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps-Swift.pre.h" @@ -13,9 +11,7 @@ @implementation RNMBXImageModule RCT_EXPORT_MODULE(); -#ifdef RCT_NEW_ARCH_ENABLED @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; -#endif // RCT_NEW_ARCH_ENABLED @synthesize bridge = _bridge; - (dispatch_queue_t)methodQueue @@ -47,13 +43,10 @@ - (void)withImage:(nonnull NSNumber*)viewRef block:(void (^)(RNMBXImage *))block } -// Thanks to this guard, we won't compile this code when we build for the old architecture. -#ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { return std::make_shared(params); } -#endif // RCT_NEW_ARCH_ENABLED @end diff --git a/ios/RNMBX/RNMBXImageSourceComponentView.h b/ios/RNMBX/RNMBXImageSourceComponentView.h index be6a0404bf..af78f7a403 100644 --- a/ios/RNMBX/RNMBXImageSourceComponentView.h +++ b/ios/RNMBX/RNMBXImageSourceComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXImageSourceComponentView.mm b/ios/RNMBX/RNMBXImageSourceComponentView.mm index c211f93ff5..f6efc42616 100644 --- a/ios/RNMBX/RNMBXImageSourceComponentView.mm +++ b/ios/RNMBX/RNMBXImageSourceComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXImageSourceComponentView.h" #import "RNMBXFabricHelpers.h" @@ -103,4 +102,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXImageSourceComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXImageSourceViewManager.m b/ios/RNMBX/RNMBXImageSourceViewManager.m deleted file mode 100644 index 5d4bc4a2b0..0000000000 --- a/ios/RNMBX/RNMBXImageSourceViewManager.m +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXImageSource, RNMBXImageSourceViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(id, NSString) -RCT_EXPORT_VIEW_PROPERTY(existing, BOOL) -RCT_EXPORT_VIEW_PROPERTY(url, NSString) -RCT_EXPORT_VIEW_PROPERTY(coordinates, NSArray) - -@end diff --git a/ios/RNMBX/RNMBXImageSourceViewManager.swift b/ios/RNMBX/RNMBXImageSourceViewManager.swift deleted file mode 100644 index 919563888c..0000000000 --- a/ios/RNMBX/RNMBXImageSourceViewManager.swift +++ /dev/null @@ -1,11 +0,0 @@ -@objc(RNMBXImageSourceViewManager) -class RNMBXImageSourceViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - @objc override func view() -> UIView { - return RNMBXImageSource() - } -} diff --git a/ios/RNMBX/RNMBXImagesComponentView.h b/ios/RNMBX/RNMBXImagesComponentView.h index 5e3a9e820a..3bf4a9129e 100644 --- a/ios/RNMBX/RNMBXImagesComponentView.h +++ b/ios/RNMBX/RNMBXImagesComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXImagesComponentView.mm b/ios/RNMBX/RNMBXImagesComponentView.mm index 97e566da6d..52203aa52a 100644 --- a/ios/RNMBX/RNMBXImagesComponentView.mm +++ b/ios/RNMBX/RNMBXImagesComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXImagesComponentView.h" #import "RNMBXFabricHelpers.h" @@ -112,4 +111,3 @@ - (void)unmountChildComponentView:(UIView *)childCompo return RNMBXImagesComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXImagesViewManager.m b/ios/RNMBX/RNMBXImagesViewManager.m deleted file mode 100644 index e6034b4d25..0000000000 --- a/ios/RNMBX/RNMBXImagesViewManager.m +++ /dev/null @@ -1,10 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXImages, RNMBXImagesViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(images, NSDictionary) -RCT_EXPORT_VIEW_PROPERTY(nativeImages, NSArray) -RCT_REMAP_VIEW_PROPERTY(onImageMissing, onImageMissing, RCTBubblingEventBlock) - -@end diff --git a/ios/RNMBX/RNMBXImagesViewManager.swift b/ios/RNMBX/RNMBXImagesViewManager.swift deleted file mode 100644 index 2461a9231f..0000000000 --- a/ios/RNMBX/RNMBXImagesViewManager.swift +++ /dev/null @@ -1,14 +0,0 @@ - -@objc(RNMBXImagesViewManager) -class RNMBXImagesViewManager : RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXImages() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXLightComponentView.h b/ios/RNMBX/RNMBXLightComponentView.h index f8551fba59..629c904b38 100644 --- a/ios/RNMBX/RNMBXLightComponentView.h +++ b/ios/RNMBX/RNMBXLightComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXLightComponentView.mm b/ios/RNMBX/RNMBXLightComponentView.mm index 61d0196c1e..f0dc33b605 100644 --- a/ios/RNMBX/RNMBXLightComponentView.mm +++ b/ios/RNMBX/RNMBXLightComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXLightComponentView.h" #import "RNMBXFabricHelpers.h" @@ -71,4 +70,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXLightComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXLightViewManager.m b/ios/RNMBX/RNMBXLightViewManager.m deleted file mode 100644 index 0e76abe43b..0000000000 --- a/ios/RNMBX/RNMBXLightViewManager.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXLight, RNMBXLightViewManager, RCTViewManager) - -// light props -RCT_EXPORT_VIEW_PROPERTY(reactStyle, NSDictionary); - -@end diff --git a/ios/RNMBX/RNMBXLightViewManager.swift b/ios/RNMBX/RNMBXLightViewManager.swift deleted file mode 100644 index 53bbc8ef60..0000000000 --- a/ios/RNMBX/RNMBXLightViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXLightViewManager) -class RNMBXLightViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let light = RNMBXLight() - light.bridge = self.bridge - return light - } -} diff --git a/ios/RNMBX/RNMBXLineLayerComponentView.h b/ios/RNMBX/RNMBXLineLayerComponentView.h index 249cc13c17..f8ba2d8c31 100644 --- a/ios/RNMBX/RNMBXLineLayerComponentView.h +++ b/ios/RNMBX/RNMBXLineLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXLineLayerComponentView.mm b/ios/RNMBX/RNMBXLineLayerComponentView.mm index 85b8563bd8..d85a9fc3e5 100644 --- a/ios/RNMBX/RNMBXLineLayerComponentView.mm +++ b/ios/RNMBX/RNMBXLineLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXLineLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -73,4 +72,3 @@ - (void)prepareForRecycle return RNMBXLineLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXLineLayerViewManager.m b/ios/RNMBX/RNMBXLineLayerViewManager.m deleted file mode 100644 index 8fcb255922..0000000000 --- a/ios/RNMBX/RNMBXLineLayerViewManager.m +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXLineLayer, RNMBXLineLayerViewManager, RCTViewManager) - -// circle layer props -RCT_EXPORT_VIEW_PROPERTY(sourceLayerID, NSString) - -// standard layer props -#include "CommonLayerProperties.H" - -@end diff --git a/ios/RNMBX/RNMBXLineLayerViewManager.swift b/ios/RNMBX/RNMBXLineLayerViewManager.swift deleted file mode 100644 index 525885e248..0000000000 --- a/ios/RNMBX/RNMBXLineLayerViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXLineLayerViewManager) -class RNMBXLineLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXLineLayer() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXMapViewComponentView.h b/ios/RNMBX/RNMBXMapViewComponentView.h index 9bbffe9271..6d990b55f0 100644 --- a/ios/RNMBX/RNMBXMapViewComponentView.h +++ b/ios/RNMBX/RNMBXMapViewComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -15,4 +14,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXMapViewComponentView.mm b/ios/RNMBX/RNMBXMapViewComponentView.mm index 2d18a04986..3dcffb8888 100644 --- a/ios/RNMBX/RNMBXMapViewComponentView.mm +++ b/ios/RNMBX/RNMBXMapViewComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXMapViewComponentView.h" #import "RNMBXFabricHelpers.h" @@ -237,4 +236,3 @@ - (void)prepareForRecycle return RNMBXMapViewComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXMapViewManager.m b/ios/RNMBX/RNMBXMapViewManager.m deleted file mode 100644 index 11371b9b09..0000000000 --- a/ios/RNMBX/RNMBXMapViewManager.m +++ /dev/null @@ -1,46 +0,0 @@ -#if !RCT_NEW_ARCH_ENABLED -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXMapView, RNMBXMapViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(onCameraChanged, RCTDirectEventBlock) - -RCT_REMAP_VIEW_PROPERTY(attributionEnabled, reactAttributionEnabled, BOOL) -RCT_REMAP_VIEW_PROPERTY(attributionPosition, reactAttributionPosition, NSDictionary) - -RCT_REMAP_VIEW_PROPERTY(logoEnabled, reactLogoEnabled, BOOL) -RCT_REMAP_VIEW_PROPERTY(logoPosition, reactLogoPosition, NSDictionary) - -RCT_REMAP_VIEW_PROPERTY(compassEnabled, reactCompassEnabled, BOOL) -RCT_REMAP_VIEW_PROPERTY(compassFadeWhenNorth, reactCompassFadeWhenNorth, BOOL) -RCT_REMAP_VIEW_PROPERTY(compassPosition, reactCompassPosition, NSDictionary) -RCT_REMAP_VIEW_PROPERTY(compassViewPosition, reactCompassViewPosition, NSInteger) -RCT_REMAP_VIEW_PROPERTY(compassViewMargins, reactCompassViewMargins, CGPoint) -RCT_REMAP_VIEW_PROPERTY(compassImage, reactCompassImage, NSString) - -RCT_REMAP_VIEW_PROPERTY(scaleBarEnabled, reactScaleBarEnabled, BOOL) -RCT_REMAP_VIEW_PROPERTY(scaleBarPosition, reactScaleBarPosition, NSDictionary) - -RCT_REMAP_VIEW_PROPERTY(zoomEnabled, reactZoomEnabled, BOOL) -RCT_REMAP_VIEW_PROPERTY(scrollEnabled, reactScrollEnabled, BOOL) -RCT_REMAP_VIEW_PROPERTY(rotateEnabled, reactRotateEnabled, BOOL) -RCT_REMAP_VIEW_PROPERTY(pitchEnabled, reactPitchEnabled, BOOL) -RCT_REMAP_VIEW_PROPERTY(maxPitch, reactMaxPitch, NSNumber) -RCT_REMAP_VIEW_PROPERTY(preferredFramesPerSecond, reactPreferredFramesPerSecond, NSInteger) -RCT_EXPORT_VIEW_PROPERTY(deselectAnnotationOnTap, BOOL) - -RCT_REMAP_VIEW_PROPERTY(projection, reactProjection, NSString) -RCT_REMAP_VIEW_PROPERTY(localizeLabels, reactLocalizeLabels, NSDictionary) - -RCT_REMAP_VIEW_PROPERTY(gestureSettings, reactGestureSettings, NSDictionary) - -RCT_REMAP_VIEW_PROPERTY(styleURL, reactStyleURL, NSString) -RCT_REMAP_VIEW_PROPERTY(onPress, reactOnPress, RCTBubblingEventBlock) -RCT_REMAP_VIEW_PROPERTY(onLongPress, reactOnLongPress, RCTBubblingEventBlock) -RCT_REMAP_VIEW_PROPERTY(onMapChange, reactOnMapChange, RCTBubblingEventBlock) - -RCT_EXPORT_VIEW_PROPERTY(mapViewImpl, NSString) - -@end -#endif diff --git a/ios/RNMBX/RNMBXMapViewManager.swift b/ios/RNMBX/RNMBXMapViewManager.swift deleted file mode 100644 index f5a46de9a5..0000000000 --- a/ios/RNMBX/RNMBXMapViewManager.swift +++ /dev/null @@ -1,347 +0,0 @@ -import MapboxMaps - -extension QueriedSourceFeature { - var feature: Feature { return self.queriedFeature.feature } -} - -#if !RCT_NEW_ARCH_ENABLED - - @objc(RNMBXMapViewManager) - open class RNMBXMapViewManager: RCTViewManager { - @objc - override public static func requiresMainQueueSetup() -> Bool { - return false - } - - func defaultFrame() -> CGRect { - return UIScreen.main.bounds - } - - override open func view() -> UIView! { - let result = RNMBXMapView( - frame: self.defaultFrame(), eventDispatcher: self.bridge.eventDispatcher()) - return result - } - } -#else - @objc(RNMBXMapViewManager) - open class RNMBXMapViewManager: NSObject { - - } -#endif - -// MARK: - react methods - -extension RNMBXMapViewManager { - @objc public static func takeSnap( - _ view: RNMBXMapView, - writeToDisk: Bool, - resolver: @escaping RCTPromiseResolveBlock - ) { - let uri = view.takeSnap(writeToDisk: writeToDisk) - resolver(["uri": uri.absoluteString]) - } - - @objc public static func queryTerrainElevation( - _ view: RNMBXMapView, - coordinates: [NSNumber], - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - let result = view.queryTerrainElevation(coordinates: coordinates) - if let result = result { - resolver(["data": NSNumber(value: result)]) - } else { - resolver(nil) - } - } - - @objc public static func setSourceVisibility( - _ view: RNMBXMapView, - visible: Bool, - sourceId: String, - sourceLayerId: String?, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - view.setSourceVisibility(visible, sourceId: sourceId, sourceLayerId: sourceLayerId) - resolver(nil) - } - - @objc public static func getCenter( - _ view: RNMBXMapView, resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - view.withMapboxMap { map in - resolver([ - "center": [ - map.cameraState.center.longitude, - map.cameraState.center.latitude, - ] - ]) - } - } - - @objc public static func getCoordinateFromView( - _ view: RNMBXMapView, - atPoint point: CGPoint, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - view.withMapboxMap { map in - let coordinates = map.coordinate(for: point) - resolver(["coordinateFromView": [coordinates.longitude, coordinates.latitude]]) - } - - } - - @objc public static func getPointInView( - _ view: RNMBXMapView, - atCoordinate coordinate: [NSNumber], - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - view.withMapboxMap { map in - let coordinate = CLLocationCoordinate2DMake( - coordinate[1].doubleValue, coordinate[0].doubleValue) - let point = map.point(for: coordinate) - resolver(["pointInView": [(point.x), (point.y)]]) - } - } - - @objc public static func setHandledMapChangedEvents( - _ view: RNMBXMapView, - events: [String], - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - view.handleMapChangedEvents = Set( - events.compactMap { - RNMBXEvent.EventType(rawValue: $0) - }) - resolver(nil) - } - - @objc public static func getZoom( - _ view: RNMBXMapView, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - view.withMapboxMap { map in - resolver(["zoom": map.cameraState.zoom]) - } - } - - @objc public static func getVisibleBounds( - _ view: RNMBXMapView, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - view.withMapboxMap { map in - resolver(["visibleBounds": map.coordinateBounds(for: view.bounds).toArray()]) - } - } - - - @objc public static func setFeatureState( - _ view: RNMBXMapView, - featureId: String, - state: [String : Any], - sourceId: String, - sourceLayerId: String?, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock) { - view.withMapboxMap { map in - map.setFeatureState( - sourceId: sourceId, - sourceLayerId: sourceLayerId, - featureId: featureId, - state: state - ) { result in - switch result { - case .success: resolver(nil) - case .failure(let error): rejecter("setFeatureState", "failed to set feature state", error) - } - } - } - } - - @objc public static func getFeatureState( - _ view: RNMBXMapView, - featureId: String, - sourceId: String, - sourceLayerId: String?, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock) { - view.withMapboxMap { map in - map.getFeatureState( - sourceId: sourceId, - sourceLayerId: sourceLayerId, - featureId: featureId - ) { result in - switch (result) { - case .success(let featureState): - resolver(["featureState": featureState]) - case .failure(let error): - rejecter("getFeatureState", "failed to get feature state", error) - } - } - } - } - - @objc public static func removeFeatureState( - _ view: RNMBXMapView, - featureId: String, - stateKey: String?, - sourceId: String, - sourceLayerId: String?, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock) { - view.withMapboxMap { map in - map.removeFeatureState( - sourceId: sourceId, - sourceLayerId: sourceLayerId, - featureId: featureId, - stateKey: stateKey - ) { result in - switch result { - case .success: resolver(nil) - case .failure(let error): rejecter("removeFeatureState", "failed to remove feature state", error) - } - } - } - } -} - -// MARK: - queryRenderedFeatures - -extension RNMBXMapViewManager { - @objc public static func queryRenderedFeaturesAtPoint( - _ view: RNMBXMapView, - atPoint point: [NSNumber], - withFilter filter: [Any]?, - withLayerIDs layerIDs: [String]?, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - view.withMapboxMap { map in - let point = CGPoint(x: CGFloat(point[0].floatValue), y: CGFloat(point[1].floatValue)) - - logged("queryRenderedFeaturesAtPoint.option", rejecter: rejecter) { - let options = try RenderedQueryOptions( - layerIds: (layerIDs ?? []).isEmpty ? nil : layerIDs, filter: filter?.asExpression()) - - map.queryRenderedFeatures(with: point, options: options) { result in - switch result { - case .success(let features): - resolver([ - "data": [ - "type": "FeatureCollection", - "features": features.compactMap { queriedFeature in - logged("queryRenderedFeaturesAtPoint.feature.toJSON") { - try queriedFeature.feature.toJSON() - } - }, - ] - ]) - case .failure(let error): - rejecter("queryRenderedFeaturesAtPoint", "failed to query features", error) - } - } - } - } - } - - @objc public static func queryRenderedFeaturesInRect( - _ map: RNMBXMapView, - withBBox bbox: [NSNumber], - withFilter filter: [Any]?, - withLayerIDs layerIDs: [String]?, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - let top = bbox.isEmpty ? 0.0 : CGFloat(bbox[0].floatValue) - let right = bbox.isEmpty ? 0.0 : CGFloat(bbox[1].floatValue) - let bottom = bbox.isEmpty ? 0.0 : CGFloat(bbox[2].floatValue) - let left = bbox.isEmpty ? 0.0 : CGFloat(bbox[3].floatValue) - let rect = - bbox.isEmpty - ? CGRect(x: 0.0, y: 0.0, width: map.bounds.size.width, height: map.bounds.size.height) - : CGRect( - x: [left, right].min()!, y: [top, bottom].min()!, width: abs(right - left), - height: abs(bottom - top)) - logged("queryRenderedFeaturesInRect.option", rejecter: rejecter) { - let options = try RenderedQueryOptions( - layerIds: layerIDs?.isEmpty ?? true ? nil : layerIDs, filter: filter?.asExpression()) - map.mapboxMap.queryRenderedFeatures(with: rect, options: options) { result in - switch result { - case .success(let features): - resolver([ - "data": [ - "type": "FeatureCollection", - "features": features.compactMap { queriedFeature in - logged("queryRenderedFeaturesInRect.queriedfeature.map") { - try queriedFeature.feature.toJSON() - } - }, - ] - ]) - case .failure(let error): - rejecter("queryRenderedFeaturesInRect", "failed to query features", error) - } - } - } - } - - @objc public static func querySourceFeatures( - _ map: RNMBXMapView, - withSourceId sourceId: String, - withFilter filter: [Any]?, - withSourceLayerIds sourceLayerIds: [String]?, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - let sourceLayerIds = sourceLayerIds?.isEmpty ?? true ? nil : sourceLayerIds - logged("querySourceFeatures.option", rejecter: rejecter) { - let options = SourceQueryOptions( - sourceLayerIds: sourceLayerIds, filter: filter ?? Exp(arguments: [])) - map.mapboxMap.querySourceFeatures(for: sourceId, options: options) { result in - switch result { - case .success(let features): - resolver([ - "data": [ - "type": "FeatureCollection", - "features": features.compactMap { queriedFeature in - logged("querySourceFeatures.queriedfeature.map") { - try queriedFeature.feature.toJSON() - } - }, - ] as [String: Any] - ]) - case .failure(let error): - rejecter( - "querySourceFeatures", - "failed to query source features: \(error.localizedDescription)", error) - } - } - } - } - - static func clearData(_ view: RNMBXMapView, completion: @escaping (Error?) -> Void) { - MapboxMap.clearData(completion: completion) - } - - @objc public static func clearData( - _ mapView: RNMBXMapView, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - self.clearData(mapView) { error in - if let error = error { - rejecter("clearData", "failed to clearData: \(error.localizedDescription)", error) - } else { - resolver(nil) - } - } - } -} diff --git a/ios/RNMBX/RNMBXMapViewModule.h b/ios/RNMBX/RNMBXMapViewModule.h index 73b4b3c25a..5a1ca287d1 100644 --- a/ios/RNMBX/RNMBXMapViewModule.h +++ b/ios/RNMBX/RNMBXMapViewModule.h @@ -2,18 +2,9 @@ #import #import "RNMBXViewResolver.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps_specs.h" -#else -#import -#endif -@interface RNMBXMapViewModule : NSObject -#ifdef RCT_NEW_ARCH_ENABLED - -#else - -#endif +@interface RNMBXMapViewModule : NSObject @end diff --git a/ios/RNMBX/RNMBXMapViewModule.mm b/ios/RNMBX/RNMBXMapViewModule.mm index 878c4c32eb..b0bcd209d3 100644 --- a/ios/RNMBX/RNMBXMapViewModule.mm +++ b/ios/RNMBX/RNMBXMapViewModule.mm @@ -3,9 +3,7 @@ #import #import "RNMBXMapViewModule.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXMapViewComponentView.h" -#endif // RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps-Swift.pre.h" #import "RNMBXViewResolver.h" @@ -14,9 +12,7 @@ @implementation RNMBXMapViewModule RCT_EXPORT_MODULE(); -#ifdef RCT_NEW_ARCH_ENABLED @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; -#endif // RCT_NEW_ARCH_ENABLED @synthesize bridge = _bridge; - (dispatch_queue_t)methodQueue @@ -148,13 +144,10 @@ - (void)withMapView:(nonnull NSNumber*)viewRef block:(void (^)(RNMBXMapView *))b } reject:reject methodName:@"querySourceFeatures"]; } -// Thanks to this guard, we won't compile this code when we build for the old architecture. -#ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { return std::make_shared(params); } -#endif // RCT_NEW_ARCH_ENABLED @end diff --git a/ios/RNMBX/RNMBXMarkerViewComponentView.h b/ios/RNMBX/RNMBXMarkerViewComponentView.h index f9213df7ca..2ed3ca3d21 100644 --- a/ios/RNMBX/RNMBXMarkerViewComponentView.h +++ b/ios/RNMBX/RNMBXMarkerViewComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXMarkerViewComponentView.mm b/ios/RNMBX/RNMBXMarkerViewComponentView.mm index 31ad30ba2b..871bbe4f65 100644 --- a/ios/RNMBX/RNMBXMarkerViewComponentView.mm +++ b/ios/RNMBX/RNMBXMarkerViewComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXMarkerViewComponentView.h" #import "RNMBXFabricHelpers.h" @@ -126,4 +125,3 @@ - (void)updateLayoutMetrics:(const LayoutMetrics &)layoutMetrics return RNMBXMarkerViewComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXMarkerViewContentComponentView.h b/ios/RNMBX/RNMBXMarkerViewContentComponentView.h index 6cfb4734f2..e755c2c32b 100644 --- a/ios/RNMBX/RNMBXMarkerViewContentComponentView.h +++ b/ios/RNMBX/RNMBXMarkerViewContentComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXMarkerViewContentComponentView.mm b/ios/RNMBX/RNMBXMarkerViewContentComponentView.mm index fe15b9e942..b7c3810005 100644 --- a/ios/RNMBX/RNMBXMarkerViewContentComponentView.mm +++ b/ios/RNMBX/RNMBXMarkerViewContentComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXMarkerViewContentComponentView.h" #import "RNMBXFabricHelpers.h" @@ -51,4 +50,3 @@ + (ComponentDescriptorProvider)componentDescriptorProvider return RNMBXMarkerViewContentComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXMarkerViewContentManager.m b/ios/RNMBX/RNMBXMarkerViewContentManager.m deleted file mode 100644 index 72f9928792..0000000000 --- a/ios/RNMBX/RNMBXMarkerViewContentManager.m +++ /dev/null @@ -1,6 +0,0 @@ -#import "React/RCTBridgeModule.h" -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXMarkerViewContent, RNMBXMarkerViewContentManager, RCTViewManager) -@end diff --git a/ios/RNMBX/RNMBXMarkerViewContentManager.swift b/ios/RNMBX/RNMBXMarkerViewContentManager.swift deleted file mode 100644 index a8df29e8b1..0000000000 --- a/ios/RNMBX/RNMBXMarkerViewContentManager.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Foundation -import MapboxMaps - -@objc(RNMBXMarkerViewContentManager) -class RNMBXMarkerViewContentManager : RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - return UIView() - } -} diff --git a/ios/RNMBX/RNMBXMarkerViewManager.m b/ios/RNMBX/RNMBXMarkerViewManager.m deleted file mode 100644 index c0ab14dce9..0000000000 --- a/ios/RNMBX/RNMBXMarkerViewManager.m +++ /dev/null @@ -1,13 +0,0 @@ -#import "React/RCTBridgeModule.h" -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXMarkerView, RNMBXMarkerViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(coordinate, NSArray) -RCT_EXPORT_VIEW_PROPERTY(anchor, NSDictionary) -RCT_EXPORT_VIEW_PROPERTY(allowOverlap, BOOL) -RCT_EXPORT_VIEW_PROPERTY(allowOverlapWithPuck, BOOL) -RCT_EXPORT_VIEW_PROPERTY(isSelected, BOOL) - -@end diff --git a/ios/RNMBX/RNMBXMarkerViewManager.swift b/ios/RNMBX/RNMBXMarkerViewManager.swift deleted file mode 100644 index 86f47973b5..0000000000 --- a/ios/RNMBX/RNMBXMarkerViewManager.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Foundation -import MapboxMaps - -@objc(RNMBXMarkerViewManager) -class RNMBXMarkerViewManager : RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - return RNMBXMarkerView() - } -} diff --git a/ios/RNMBX/RNMBXModelLayerComponentView.h b/ios/RNMBX/RNMBXModelLayerComponentView.h index acc6f934d9..ac881a5a50 100644 --- a/ios/RNMBX/RNMBXModelLayerComponentView.h +++ b/ios/RNMBX/RNMBXModelLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXModelLayerComponentView.mm b/ios/RNMBX/RNMBXModelLayerComponentView.mm index a754fc7dfb..25c72bfd7d 100644 --- a/ios/RNMBX/RNMBXModelLayerComponentView.mm +++ b/ios/RNMBX/RNMBXModelLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXModelLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -73,4 +72,3 @@ - (void)prepareForRecycle return RNMBXModelLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXModelLayerViewManager.m b/ios/RNMBX/RNMBXModelLayerViewManager.m deleted file mode 100644 index ba4fc31ab8..0000000000 --- a/ios/RNMBX/RNMBXModelLayerViewManager.m +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXModelLayer, RNMBXModelLayerViewManager, RCTViewManager) - -// circle layer props -RCT_EXPORT_VIEW_PROPERTY(sourceLayerID, NSString) - -// standard layer props -#include "CommonLayerProperties.H" - -@end diff --git a/ios/RNMBX/RNMBXModelLayerViewManager.swift b/ios/RNMBX/RNMBXModelLayerViewManager.swift deleted file mode 100644 index 1623101f18..0000000000 --- a/ios/RNMBX/RNMBXModelLayerViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXModelLayerViewManager) -class RNMBXModelLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXModelLayer() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXModelsComponentView.h b/ios/RNMBX/RNMBXModelsComponentView.h index cd2d1a7639..b820282891 100644 --- a/ios/RNMBX/RNMBXModelsComponentView.h +++ b/ios/RNMBX/RNMBXModelsComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -14,4 +13,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXModelsComponentView.mm b/ios/RNMBX/RNMBXModelsComponentView.mm index 9d562bc8e9..68b4f41731 100644 --- a/ios/RNMBX/RNMBXModelsComponentView.mm +++ b/ios/RNMBX/RNMBXModelsComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXModelsComponentView.h" @@ -70,4 +69,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXModelsComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXModelsManager.mm b/ios/RNMBX/RNMBXModelsManager.mm deleted file mode 100644 index 4817170b35..0000000000 --- a/ios/RNMBX/RNMBXModelsManager.mm +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXModels, RNMBXModelsManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(models, NSDictionary) - -@end - diff --git a/ios/RNMBX/RNMBXModelsManager.swift b/ios/RNMBX/RNMBXModelsManager.swift deleted file mode 100644 index b8d154cf6f..0000000000 --- a/ios/RNMBX/RNMBXModelsManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXModelsManager) -public class RNMBXModelsManager : RCTViewManager { - @objc - public override static func requiresMainQueueSetup() -> Bool { - return false - } - - public override func view() -> UIView! { - let layer = RNMBXModels() - return layer - } -} - diff --git a/ios/RNMBX/RNMBXNativeUserLocationComponentView.h b/ios/RNMBX/RNMBXNativeUserLocationComponentView.h index 5cf6979930..022311dffa 100644 --- a/ios/RNMBX/RNMBXNativeUserLocationComponentView.h +++ b/ios/RNMBX/RNMBXNativeUserLocationComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXNativeUserLocationComponentView.mm b/ios/RNMBX/RNMBXNativeUserLocationComponentView.mm index 5889c8a228..fb5b0ae8c8 100644 --- a/ios/RNMBX/RNMBXNativeUserLocationComponentView.mm +++ b/ios/RNMBX/RNMBXNativeUserLocationComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXNativeUserLocationComponentView.h" #import "RNMBXFabricHelpers.h" @@ -84,4 +83,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXNativeUserLocationComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXNativeUserLocationViewManager.m b/ios/RNMBX/RNMBXNativeUserLocationViewManager.m deleted file mode 100644 index 64526b37c1..0000000000 --- a/ios/RNMBX/RNMBXNativeUserLocationViewManager.m +++ /dev/null @@ -1,17 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXNativeUserLocation, RNMBXNativeUserLocationViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(iosShowsUserHeadingIndicator, BOOL); -RCT_EXPORT_VIEW_PROPERTY(topImage, NSString); -RCT_EXPORT_VIEW_PROPERTY(bearingImage, NSString); -RCT_EXPORT_VIEW_PROPERTY(shadowImage, NSString); -RCT_EXPORT_VIEW_PROPERTY(scale, NSArray); -RCT_EXPORT_VIEW_PROPERTY(visible, BOOL); -RCT_EXPORT_VIEW_PROPERTY(puckBearing, NSString); -RCT_EXPORT_VIEW_PROPERTY(puckBearingEnabled, BOOL); -RCT_EXPORT_VIEW_PROPERTY(pulsing, NSDictionary); - -@end - diff --git a/ios/RNMBX/RNMBXNativeUserLocationViewManager.swift b/ios/RNMBX/RNMBXNativeUserLocationViewManager.swift deleted file mode 100644 index 83b1f3a43f..0000000000 --- a/ios/RNMBX/RNMBXNativeUserLocationViewManager.swift +++ /dev/null @@ -1,11 +0,0 @@ -@objc(RNMBXNativeUserLocationViewManager) -class RNMBXNativeUserLocationViewManager : RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - @objc override func view() -> UIView { - return RNMBXNativeUserLocation() - } -} diff --git a/ios/RNMBX/RNMBXPointAnnotationComponentView.h b/ios/RNMBX/RNMBXPointAnnotationComponentView.h index 9ee60055a6..ffa33f0abf 100644 --- a/ios/RNMBX/RNMBXPointAnnotationComponentView.h +++ b/ios/RNMBX/RNMBXPointAnnotationComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXPointAnnotationComponentView.mm b/ios/RNMBX/RNMBXPointAnnotationComponentView.mm index 1737f49b85..993b897cb5 100644 --- a/ios/RNMBX/RNMBXPointAnnotationComponentView.mm +++ b/ios/RNMBX/RNMBXPointAnnotationComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXPointAnnotationComponentView.h" #import "RNMBXFabricHelpers.h" @@ -142,4 +141,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXPointAnnotationComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXPointAnnotationModule.h b/ios/RNMBX/RNMBXPointAnnotationModule.h index fa65c63444..4486a8f85f 100644 --- a/ios/RNMBX/RNMBXPointAnnotationModule.h +++ b/ios/RNMBX/RNMBXPointAnnotationModule.h @@ -2,17 +2,8 @@ #import #import "RNMBXViewResolver.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps_specs.h" -#else -#import -#endif -@interface RNMBXPointAnnotationModule : NSObject -#ifdef RCT_NEW_ARCH_ENABLED - -#else - -#endif +@interface RNMBXPointAnnotationModule : NSObject @end diff --git a/ios/RNMBX/RNMBXPointAnnotationModule.mm b/ios/RNMBX/RNMBXPointAnnotationModule.mm index 487c23f167..b90e2fe0f5 100644 --- a/ios/RNMBX/RNMBXPointAnnotationModule.mm +++ b/ios/RNMBX/RNMBXPointAnnotationModule.mm @@ -3,9 +3,7 @@ #import #import "RNMBXPointAnnotationModule.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXPointAnnotationComponentView.h" -#endif // RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps-Swift.pre.h" @@ -13,9 +11,7 @@ @implementation RNMBXPointAnnotationModule RCT_EXPORT_MODULE(); -#ifdef RCT_NEW_ARCH_ENABLED @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; -#endif // RCT_NEW_ARCH_ENABLED @synthesize bridge = _bridge; - (dispatch_queue_t)methodQueue @@ -46,13 +42,10 @@ - (void)withPointAnnotation:(nonnull NSNumber*)viewRef block:(void (^)(RNMBXPoin } -// Thanks to this guard, we won't compile this code when we build for the old architecture. -#ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { return std::make_shared(params); } -#endif // RCT_NEW_ARCH_ENABLED @end diff --git a/ios/RNMBX/RNMBXPointAnnotationViewManager.m b/ios/RNMBX/RNMBXPointAnnotationViewManager.m deleted file mode 100644 index 6fa19e57c8..0000000000 --- a/ios/RNMBX/RNMBXPointAnnotationViewManager.m +++ /dev/null @@ -1,18 +0,0 @@ -#import "React/RCTBridgeModule.h" -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXPointAnnotation, RNMBXPointAnnotationViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(coordinate, NSString) -RCT_EXPORT_VIEW_PROPERTY(draggable, BOOL) -RCT_EXPORT_VIEW_PROPERTY(id, NSString) -RCT_EXPORT_VIEW_PROPERTY(anchor, NSDictionary) - -RCT_REMAP_VIEW_PROPERTY(onMapboxPointAnnotationDeselected, onDeselected, RCTBubblingEventBlock) -RCT_REMAP_VIEW_PROPERTY(onMapboxPointAnnotationDrag, onDrag, RCTBubblingEventBlock) -RCT_REMAP_VIEW_PROPERTY(onMapboxPointAnnotationDragEnd, onDragEnd, RCTBubblingEventBlock) -RCT_REMAP_VIEW_PROPERTY(onMapboxPointAnnotationDragStart, onDragStart, RCTBubblingEventBlock) -RCT_REMAP_VIEW_PROPERTY(onMapboxPointAnnotationSelected, onSelected, RCTBubblingEventBlock) - -@end diff --git a/ios/RNMBX/RNMBXPointAnnotationViewManager.swift b/ios/RNMBX/RNMBXPointAnnotationViewManager.swift deleted file mode 100644 index 8e92b954c4..0000000000 --- a/ios/RNMBX/RNMBXPointAnnotationViewManager.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Foundation -import MapboxMaps - -@objc(RNMBXPointAnnotationViewManager) -class RNMBXPointAnnotationViewManager : RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - return RNMBXPointAnnotation() - } -} diff --git a/ios/RNMBX/RNMBXRasterArraySourceComponentView.h b/ios/RNMBX/RNMBXRasterArraySourceComponentView.h index 94286306ac..c0caeb4921 100644 --- a/ios/RNMBX/RNMBXRasterArraySourceComponentView.h +++ b/ios/RNMBX/RNMBXRasterArraySourceComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXRasterArraySourceComponentView.mm b/ios/RNMBX/RNMBXRasterArraySourceComponentView.mm index d2fbd01018..800290bad0 100644 --- a/ios/RNMBX/RNMBXRasterArraySourceComponentView.mm +++ b/ios/RNMBX/RNMBXRasterArraySourceComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXRasterArraySourceComponentView.h" #import "RNMBXFabricHelpers.h" @@ -121,4 +120,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXRasterArraySourceViewManager.swift b/ios/RNMBX/RNMBXRasterArraySourceViewManager.swift deleted file mode 100644 index d5b3e13d08..0000000000 --- a/ios/RNMBX/RNMBXRasterArraySourceViewManager.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Foundation -import MapboxMaps - -@objc(RNMBXRasterArraySourceViewManager) -class RNMBXRasterArraySourceViewManager : RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - return RNMBXRasterArraySource() - } -} diff --git a/ios/RNMBX/RNMBXRasterDemSourceComponentView.h b/ios/RNMBX/RNMBXRasterDemSourceComponentView.h index 0d66f525cf..022c087576 100644 --- a/ios/RNMBX/RNMBXRasterDemSourceComponentView.h +++ b/ios/RNMBX/RNMBXRasterDemSourceComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXRasterDemSourceComponentView.mm b/ios/RNMBX/RNMBXRasterDemSourceComponentView.mm index aefd8c179c..cef43c1692 100644 --- a/ios/RNMBX/RNMBXRasterDemSourceComponentView.mm +++ b/ios/RNMBX/RNMBXRasterDemSourceComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXRasterDemSourceComponentView.h" #import "RNMBXFabricHelpers.h" @@ -116,4 +115,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXRasterDemSourceComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXRasterDemSourceViewManager.m b/ios/RNMBX/RNMBXRasterDemSourceViewManager.m deleted file mode 100644 index 5bbfd3b23c..0000000000 --- a/ios/RNMBX/RNMBXRasterDemSourceViewManager.m +++ /dev/null @@ -1,15 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXRasterDemSource, RNMBXRasterDemSourceViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(id, NSString) -RCT_EXPORT_VIEW_PROPERTY(existing, BOOL) -RCT_EXPORT_VIEW_PROPERTY(url, NSString) -RCT_EXPORT_VIEW_PROPERTY(tileUrlTemplates, NSArray) -RCT_EXPORT_VIEW_PROPERTY(bounds, NSArray) -RCT_EXPORT_VIEW_PROPERTY(minZoomLevel, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(maxZoomLevel, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(tileSize, NSNumber) - -@end diff --git a/ios/RNMBX/RNMBXRasterDemSourceViewManager.swift b/ios/RNMBX/RNMBXRasterDemSourceViewManager.swift deleted file mode 100644 index 6fe423dff5..0000000000 --- a/ios/RNMBX/RNMBXRasterDemSourceViewManager.swift +++ /dev/null @@ -1,11 +0,0 @@ -@objc(RNMBXRasterDemSourceViewManager) -class RNMBXRasterDemSourceViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - @objc override func view() -> UIView { - return RNMBXRasterDemSource() - } -} diff --git a/ios/RNMBX/RNMBXRasterLayerComponentView.h b/ios/RNMBX/RNMBXRasterLayerComponentView.h index f6e20cd6d8..ff55a7c3f5 100644 --- a/ios/RNMBX/RNMBXRasterLayerComponentView.h +++ b/ios/RNMBX/RNMBXRasterLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXRasterLayerComponentView.mm b/ios/RNMBX/RNMBXRasterLayerComponentView.mm index deb4828768..a63025161e 100644 --- a/ios/RNMBX/RNMBXRasterLayerComponentView.mm +++ b/ios/RNMBX/RNMBXRasterLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXRasterLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -73,4 +72,3 @@ - (void)prepareForRecycle return RNMBXRasterLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXRasterLayerViewManager.m b/ios/RNMBX/RNMBXRasterLayerViewManager.m deleted file mode 100644 index c1cb84cd86..0000000000 --- a/ios/RNMBX/RNMBXRasterLayerViewManager.m +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXRasterLayer, RNMBXRasterLayerViewManager, RCTViewManager) - -// symbol layer props -RCT_EXPORT_VIEW_PROPERTY(sourceLayerID, NSString) - -// standard layer props -#include "CommonLayerProperties.H" - -@end diff --git a/ios/RNMBX/RNMBXRasterLayerViewManager.swift b/ios/RNMBX/RNMBXRasterLayerViewManager.swift deleted file mode 100644 index 217d452d43..0000000000 --- a/ios/RNMBX/RNMBXRasterLayerViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXRasterLayerViewManager) -class RNMBXRasterLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXRasterLayer() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXRasterParticleLayerComponentView.h b/ios/RNMBX/RNMBXRasterParticleLayerComponentView.h index 9b1839b529..6492ead243 100644 --- a/ios/RNMBX/RNMBXRasterParticleLayerComponentView.h +++ b/ios/RNMBX/RNMBXRasterParticleLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXRasterParticleLayerComponentView.mm b/ios/RNMBX/RNMBXRasterParticleLayerComponentView.mm index 537e7d034a..0b10b22227 100644 --- a/ios/RNMBX/RNMBXRasterParticleLayerComponentView.mm +++ b/ios/RNMBX/RNMBXRasterParticleLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXRasterParticleLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -73,4 +72,3 @@ - (void)prepareForRecycle return RNMBXRasterParticleLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXRasterParticleLayerViewManager.swift b/ios/RNMBX/RNMBXRasterParticleLayerViewManager.swift deleted file mode 100644 index e2023d4f78..0000000000 --- a/ios/RNMBX/RNMBXRasterParticleLayerViewManager.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Foundation - -@objc(RNMBXRasterParticleLayerViewManager) -class RNMBXRasterParticleLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXRasterParticleLayer() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXRasterSourceComponentView.h b/ios/RNMBX/RNMBXRasterSourceComponentView.h index 0a482952b5..2f60b56ed3 100644 --- a/ios/RNMBX/RNMBXRasterSourceComponentView.h +++ b/ios/RNMBX/RNMBXRasterSourceComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXRasterSourceComponentView.mm b/ios/RNMBX/RNMBXRasterSourceComponentView.mm index e4a3db777a..d007a56f69 100644 --- a/ios/RNMBX/RNMBXRasterSourceComponentView.mm +++ b/ios/RNMBX/RNMBXRasterSourceComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXRasterSourceComponentView.h" #import "RNMBXFabricHelpers.h" @@ -128,4 +127,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXRasterSourceComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXRasterSourceViewManager.m b/ios/RNMBX/RNMBXRasterSourceViewManager.m deleted file mode 100644 index 6c95668e9e..0000000000 --- a/ios/RNMBX/RNMBXRasterSourceViewManager.m +++ /dev/null @@ -1,19 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXRasterSource, RNMBXRasterSourceViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(id, NSString) -RCT_EXPORT_VIEW_PROPERTY(existing, BOOL) -RCT_EXPORT_VIEW_PROPERTY(url, NSString) -RCT_EXPORT_VIEW_PROPERTY(tileUrlTemplates, NSArray) - -RCT_EXPORT_VIEW_PROPERTY(tileSize, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(minZoomLevel, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(maxZoomLevel, NSNumber) - -RCT_EXPORT_VIEW_PROPERTY(tms, BOOL) -RCT_EXPORT_VIEW_PROPERTY(attribution, NSString) -RCT_EXPORT_VIEW_PROPERTY(sourceBounds, NSArray) - -@end diff --git a/ios/RNMBX/RNMBXRasterSourceViewManager.swift b/ios/RNMBX/RNMBXRasterSourceViewManager.swift deleted file mode 100644 index 800ab7024a..0000000000 --- a/ios/RNMBX/RNMBXRasterSourceViewManager.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Foundation -import MapboxMaps - -@objc(RNMBXRasterSourceViewManager) -class RNMBXRasterSourceViewManager : RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - return RNMBXRasterSource() - } -} diff --git a/ios/RNMBX/RNMBXShapeSourceComponentView.h b/ios/RNMBX/RNMBXShapeSourceComponentView.h index fe2b39f9f0..6e32df03c3 100644 --- a/ios/RNMBX/RNMBXShapeSourceComponentView.h +++ b/ios/RNMBX/RNMBXShapeSourceComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXShapeSourceComponentView.mm b/ios/RNMBX/RNMBXShapeSourceComponentView.mm index 46e01c59b0..7dd1e39064 100644 --- a/ios/RNMBX/RNMBXShapeSourceComponentView.mm +++ b/ios/RNMBX/RNMBXShapeSourceComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXShapeSourceComponentView.h" #import "RNMBXFabricHelpers.h" @@ -119,4 +118,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXShapeSourceComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXShapeSourceModule.h b/ios/RNMBX/RNMBXShapeSourceModule.h index 8389d4fe09..80147174bc 100644 --- a/ios/RNMBX/RNMBXShapeSourceModule.h +++ b/ios/RNMBX/RNMBXShapeSourceModule.h @@ -2,18 +2,9 @@ #import #import "RNMBXViewResolver.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps_specs.h" -#else -#import -#endif -@interface RNMBXShapeSourceModule : NSObject -#ifdef RCT_NEW_ARCH_ENABLED - -#else - -#endif +@interface RNMBXShapeSourceModule : NSObject @end diff --git a/ios/RNMBX/RNMBXShapeSourceModule.mm b/ios/RNMBX/RNMBXShapeSourceModule.mm index b47d52c326..6fbd512586 100644 --- a/ios/RNMBX/RNMBXShapeSourceModule.mm +++ b/ios/RNMBX/RNMBXShapeSourceModule.mm @@ -3,9 +3,7 @@ #import #import "RNMBXShapeSourceModule.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXShapeSourceComponentView.h" -#endif // RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps-Swift.pre.h" @@ -13,9 +11,7 @@ @implementation RNMBXShapeSourceModule RCT_EXPORT_MODULE(); -#ifdef RCT_NEW_ARCH_ENABLED @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; -#endif // RCT_NEW_ARCH_ENABLED @synthesize bridge = _bridge; - (dispatch_queue_t)methodQueue @@ -59,13 +55,10 @@ - (void)withShapeSource:(nonnull NSNumber*)viewRef block:(void (^)(RNMBXShapeSou } reject:reject methodName:@"getClusterExpansionZoom"]; } -// Thanks to this guard, we won't compile this code when we build for the old architecture. -#ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { return std::make_shared(params); } -#endif // RCT_NEW_ARCH_ENABLED @end diff --git a/ios/RNMBX/RNMBXShapeSourceViewManager.m b/ios/RNMBX/RNMBXShapeSourceViewManager.m deleted file mode 100644 index 7ef003d886..0000000000 --- a/ios/RNMBX/RNMBXShapeSourceViewManager.m +++ /dev/null @@ -1,28 +0,0 @@ -#if !RCT_NEW_ARCH_ENABLED -#import -#import - -@interface -RCT_EXTERN_REMAP_MODULE(RNMBXShapeSource, RNMBXShapeSourceViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(id, NSString) -RCT_EXPORT_VIEW_PROPERTY(existing, BOOL) -RCT_EXPORT_VIEW_PROPERTY(url, NSString) -RCT_EXPORT_VIEW_PROPERTY(shape, NSString) - -RCT_EXPORT_VIEW_PROPERTY(cluster, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(clusterRadius, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(clusterMaxZoomLevel, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(clusterProperties, NSDictionary) -RCT_EXPORT_VIEW_PROPERTY(maxZoomLevel, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(buffer, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(tolerance, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(lineMetrics, BOOL) -RCT_EXPORT_VIEW_PROPERTY(images, NSDictionary) -RCT_EXPORT_VIEW_PROPERTY(nativeImages, NSArray) -RCT_EXPORT_VIEW_PROPERTY(hasPressListener, BOOL) -RCT_EXPORT_VIEW_PROPERTY(hitbox, NSDictionary) -RCT_REMAP_VIEW_PROPERTY(onMapboxShapeSourcePress, onPress, RCTBubblingEventBlock) - -@end -#endif diff --git a/ios/RNMBX/RNMBXShapeSourceViewManager.swift b/ios/RNMBX/RNMBXShapeSourceViewManager.swift deleted file mode 100644 index f44e2d6944..0000000000 --- a/ios/RNMBX/RNMBXShapeSourceViewManager.swift +++ /dev/null @@ -1,81 +0,0 @@ -#if !RCT_NEW_ARCH_ENABLED - @objc(RNMBXShapeSourceViewManager) - public class RNMBXShapeSourceViewManager: RCTViewManager { - @objc - override public static func requiresMainQueueSetup() -> Bool { - return false - } - - @objc override public func view() -> UIView { - return RNMBXShapeSource() - } - } -#else - @objc(RNMBXShapeSourceViewManager) - public class RNMBXShapeSourceViewManager: NSObject {} -#endif -// MARK: - react methods - -extension RNMBXShapeSourceViewManager { - @objc public static func getClusterExpansionZoom( - shapeSource: RNMBXShapeSource, - featureJSON: String, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - shapeSource.getClusterExpansionZoom(featureJSON) { result in - switch result { - case .success(let zoom): - resolver([ - "data": NSNumber(value: zoom) - ]) - case .failure(let error): - rejecter(error.localizedDescription, "Error.getClusterExpansionZoom", error) - } - } - } - - @objc public static func getClusterLeaves( - shapeSource: RNMBXShapeSource, - featureJSON: String, - number: uint, - offset: uint, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - shapeSource.getClusterLeaves(featureJSON, number: number, offset: offset) { result in - switch result { - case .success(let features): - logged("getClusterLeaves", rejecter: rejecter) { - let featuresJSON: Any = try features.features.toJSON() - resolver([ - "data": ["type": "FeatureCollection", "features": featuresJSON] - ]) - } - case .failure(let error): - rejecter(error.localizedDescription, "Error.getClusterLeaves", error) - } - } - } - - @objc public static func getClusterChildren( - shapeSource: RNMBXShapeSource, - featureJSON: String, - resolver: @escaping RCTPromiseResolveBlock, - rejecter: @escaping RCTPromiseRejectBlock - ) { - shapeSource.getClusterChildren(featureJSON) { result in - switch result { - case .success(let features): - logged("getClusterChildren", rejecter: rejecter) { - let featuresJSON: Any = try features.features.toJSON() - resolver([ - "data": ["type": "FeatureCollection", "features": featuresJSON] - ]) - } - case .failure(let error): - rejecter(error.localizedDescription, "Error.getClusterChildren", error) - } - } - } -} diff --git a/ios/RNMBX/RNMBXSkyLayerComponentView.h b/ios/RNMBX/RNMBXSkyLayerComponentView.h index a0f73fddd0..d16e8608ad 100644 --- a/ios/RNMBX/RNMBXSkyLayerComponentView.h +++ b/ios/RNMBX/RNMBXSkyLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXSkyLayerComponentView.mm b/ios/RNMBX/RNMBXSkyLayerComponentView.mm index 9dcdef5bfc..8adb75f9d4 100644 --- a/ios/RNMBX/RNMBXSkyLayerComponentView.mm +++ b/ios/RNMBX/RNMBXSkyLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXSkyLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -73,4 +72,3 @@ - (void)prepareForRecycle return RNMBXSkyLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXSkyLayerViewManager.m b/ios/RNMBX/RNMBXSkyLayerViewManager.m deleted file mode 100644 index 6c9ec2262d..0000000000 --- a/ios/RNMBX/RNMBXSkyLayerViewManager.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXSkyLayer, RNMBXSkyLayerViewManager, RCTViewManager) - -// standard layer props -#include "CommonLayerProperties.H" - -@end diff --git a/ios/RNMBX/RNMBXSkyLayerViewManager.swift b/ios/RNMBX/RNMBXSkyLayerViewManager.swift deleted file mode 100644 index c94e116079..0000000000 --- a/ios/RNMBX/RNMBXSkyLayerViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXSkyLayerViewManager) -class RNMBXSkyLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXSkyLayer() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXSnapshotModule.m b/ios/RNMBX/RNMBXSnapshotModule.m index 934547df09..4282035d3a 100644 --- a/ios/RNMBX/RNMBXSnapshotModule.m +++ b/ios/RNMBX/RNMBXSnapshotModule.m @@ -1,5 +1,4 @@ #import -#import @interface RCT_EXTERN_MODULE(RNMBXSnapshotModule, NSObject) diff --git a/ios/RNMBX/RNMBXStyleImportComponentView.h b/ios/RNMBX/RNMBXStyleImportComponentView.h index 1763d21869..ff11547f8c 100644 --- a/ios/RNMBX/RNMBXStyleImportComponentView.h +++ b/ios/RNMBX/RNMBXStyleImportComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -14,4 +13,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXStyleImportComponentView.mm b/ios/RNMBX/RNMBXStyleImportComponentView.mm index ae6b833690..b247f9cd33 100644 --- a/ios/RNMBX/RNMBXStyleImportComponentView.mm +++ b/ios/RNMBX/RNMBXStyleImportComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXStyleImportComponentView.h" #import "RNMBXFabricHelpers.h" @@ -83,4 +82,3 @@ - (void)prepareForRecycle { return RNMBXStyleImportComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXStyleImportManager.m b/ios/RNMBX/RNMBXStyleImportManager.m deleted file mode 100644 index 7b34cb6466..0000000000 --- a/ios/RNMBX/RNMBXStyleImportManager.m +++ /dev/null @@ -1,10 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXStyleImport, RNMBXStyleImportManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(id, NSString) -RCT_EXPORT_VIEW_PROPERTY(existing, BOOL) -RCT_EXPORT_VIEW_PROPERTY(config, NSDictionary) - -@end diff --git a/ios/RNMBX/RNMBXStyleImportManager.swift b/ios/RNMBX/RNMBXStyleImportManager.swift deleted file mode 100644 index ad5c3505dc..0000000000 --- a/ios/RNMBX/RNMBXStyleImportManager.swift +++ /dev/null @@ -1,12 +0,0 @@ -@objc(RNMBXStyleImportManager) -class RNMBXStyleImportManager : RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXStyleImport() - return layer - } -} diff --git a/ios/RNMBX/RNMBXSymbolLayerComponentView.h b/ios/RNMBX/RNMBXSymbolLayerComponentView.h index 23838ba666..0faab5c864 100644 --- a/ios/RNMBX/RNMBXSymbolLayerComponentView.h +++ b/ios/RNMBX/RNMBXSymbolLayerComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXSymbolLayerComponentView.mm b/ios/RNMBX/RNMBXSymbolLayerComponentView.mm index edf57f4458..3aa4a59f4c 100644 --- a/ios/RNMBX/RNMBXSymbolLayerComponentView.mm +++ b/ios/RNMBX/RNMBXSymbolLayerComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXSymbolLayerComponentView.h" #import "RNMBXFabricHelpers.h" @@ -73,4 +72,3 @@ - (void)prepareForRecycle return RNMBXSymbolLayerComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXSymbolLayerViewManager.m b/ios/RNMBX/RNMBXSymbolLayerViewManager.m deleted file mode 100644 index 917105d063..0000000000 --- a/ios/RNMBX/RNMBXSymbolLayerViewManager.m +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXSymbolLayer, RNMBXSymbolLayerViewManager, RCTViewManager) - -// symbol layer props -RCT_EXPORT_VIEW_PROPERTY(sourceLayerID, NSString) - -// standard layer props -#include "CommonLayerProperties.H" - -@end diff --git a/ios/RNMBX/RNMBXSymbolLayerViewManager.swift b/ios/RNMBX/RNMBXSymbolLayerViewManager.swift deleted file mode 100644 index 718b3b18c8..0000000000 --- a/ios/RNMBX/RNMBXSymbolLayerViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXSymbolLayerViewManager) -class RNMBXSymbolLayerViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let layer = RNMBXSymbolLayer() - layer.bridge = self.bridge - return layer - } -} diff --git a/ios/RNMBX/RNMBXTerrainComponentView.h b/ios/RNMBX/RNMBXTerrainComponentView.h index f2602ed33f..4b251c54bb 100644 --- a/ios/RNMBX/RNMBXTerrainComponentView.h +++ b/ios/RNMBX/RNMBXTerrainComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXTerrainComponentView.mm b/ios/RNMBX/RNMBXTerrainComponentView.mm index 8940b8ff56..2b84d500df 100644 --- a/ios/RNMBX/RNMBXTerrainComponentView.mm +++ b/ios/RNMBX/RNMBXTerrainComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXTerrainComponentView.h" #import "RNMBXFabricHelpers.h" @@ -81,4 +80,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXTerrainComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXTerrainViewManager.m b/ios/RNMBX/RNMBXTerrainViewManager.m deleted file mode 100644 index 359ed8423b..0000000000 --- a/ios/RNMBX/RNMBXTerrainViewManager.m +++ /dev/null @@ -1,15 +0,0 @@ -#import -#import - -@interface RNMBXTerrain : UIView -{} -@property (nonatomic) NSObject* exaggeration; -@end - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXTerrain, RNMBXTerrainViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(sourceID, NSString); - -RCT_EXPORT_VIEW_PROPERTY(reactStyle, NSDictionary); - -@end diff --git a/ios/RNMBX/RNMBXTerrainViewManager.swift b/ios/RNMBX/RNMBXTerrainViewManager.swift deleted file mode 100644 index ac2d68dd9f..0000000000 --- a/ios/RNMBX/RNMBXTerrainViewManager.swift +++ /dev/null @@ -1,13 +0,0 @@ -@objc(RNMBXTerrainViewManager) -class RNMBXTerrainViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - override func view() -> UIView! { - let terrain = RNMBXTerrain() - terrain.bridge = self.bridge - return terrain - } -} diff --git a/ios/RNMBX/RNMBXVectorSourceComponentView.h b/ios/RNMBX/RNMBXVectorSourceComponentView.h index 288256e97b..370e785af7 100644 --- a/ios/RNMBX/RNMBXVectorSourceComponentView.h +++ b/ios/RNMBX/RNMBXVectorSourceComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -12,4 +11,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXVectorSourceComponentView.mm b/ios/RNMBX/RNMBXVectorSourceComponentView.mm index 332701b043..a8bf74c389 100644 --- a/ios/RNMBX/RNMBXVectorSourceComponentView.mm +++ b/ios/RNMBX/RNMBXVectorSourceComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXVectorSourceComponentView.h" #import "RNMBXFabricHelpers.h" @@ -141,4 +140,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXVectorSourceComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXVectorSourceViewManager.m b/ios/RNMBX/RNMBXVectorSourceViewManager.m deleted file mode 100644 index 4b1ebbe9a9..0000000000 --- a/ios/RNMBX/RNMBXVectorSourceViewManager.m +++ /dev/null @@ -1,22 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXVectorSource, RNMBXVectorSourceViewManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(id, NSString) -RCT_EXPORT_VIEW_PROPERTY(existing, BOOL) -RCT_EXPORT_VIEW_PROPERTY(url, NSString) - -RCT_EXPORT_VIEW_PROPERTY(tileUrlTemplates, NSArray) - -RCT_EXPORT_VIEW_PROPERTY(attribution, NSString) - -RCT_EXPORT_VIEW_PROPERTY(minZoomLevel, NSNumber) -RCT_EXPORT_VIEW_PROPERTY(maxZoomLevel, NSNumber) - -RCT_EXPORT_VIEW_PROPERTY(tms, BOOL) -RCT_EXPORT_VIEW_PROPERTY(hasPressListener, BOOL) -RCT_EXPORT_VIEW_PROPERTY(hitbox, NSDictionary) -RCT_REMAP_VIEW_PROPERTY(onMapboxVectorSourcePress, onPress, RCTBubblingEventBlock) - -@end diff --git a/ios/RNMBX/RNMBXVectorSourceViewManager.swift b/ios/RNMBX/RNMBXVectorSourceViewManager.swift deleted file mode 100644 index 6da74d869b..0000000000 --- a/ios/RNMBX/RNMBXVectorSourceViewManager.swift +++ /dev/null @@ -1,11 +0,0 @@ -@objc(RNMBXVectorSourceViewManager) -class RNMBXVectorSourceViewManager: RCTViewManager { - @objc - override static func requiresMainQueueSetup() -> Bool { - return false - } - - @objc override func view() -> UIView { - return RNMBXVectorSource() - } -} diff --git a/ios/RNMBX/RNMBXViewportComponentView.h b/ios/RNMBX/RNMBXViewportComponentView.h index e614dd2d1a..c7cc333967 100644 --- a/ios/RNMBX/RNMBXViewportComponentView.h +++ b/ios/RNMBX/RNMBXViewportComponentView.h @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import @@ -14,4 +13,3 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXViewportComponentView.mm b/ios/RNMBX/RNMBXViewportComponentView.mm index 5d3ff077d5..00ed1b4efe 100644 --- a/ios/RNMBX/RNMBXViewportComponentView.mm +++ b/ios/RNMBX/RNMBXViewportComponentView.mm @@ -1,4 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXViewportComponentView.h" @@ -123,4 +122,3 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & return RNMBXViewportComponentView.class; } -#endif // RCT_NEW_ARCH_ENABLED diff --git a/ios/RNMBX/RNMBXViewportManager.m b/ios/RNMBX/RNMBXViewportManager.m deleted file mode 100644 index 7f14e3b9d5..0000000000 --- a/ios/RNMBX/RNMBXViewportManager.m +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import - -@interface RCT_EXTERN_REMAP_MODULE(RNMBXViewport, RNMBXViewportManager, RCTViewManager) - -RCT_EXPORT_VIEW_PROPERTY(transitionsToIdleUponUserInteraction, NSNumber) - -RCT_EXPORT_VIEW_PROPERTY(hasStatusChanged, BOOL) - -RCT_EXPORT_VIEW_PROPERTY(onStatusChanged, RCTBubblingEventBlock) - -@end diff --git a/ios/RNMBX/RNMBXViewportManager.swift b/ios/RNMBX/RNMBXViewportManager.swift deleted file mode 100644 index 7bc46a9154..0000000000 --- a/ios/RNMBX/RNMBXViewportManager.swift +++ /dev/null @@ -1,38 +0,0 @@ -@objc(RNMBXViewportManager) -public class RNMBXViewportManager : RCTViewManager { - @objc - public override static func requiresMainQueueSetup() -> Bool { - return false - } - - public override func view() -> UIView! { - let layer = RNMBXViewport() - return layer - } - - @objc public static func getState( - _ view: RNMBXViewport, - resolve: @escaping RCTPromiseResolveBlock, - reject: @escaping RCTPromiseRejectBlock) { - resolve(view.getState()) - } - - @objc public static func idle( - _ view: RNMBXViewport, - resolve: @escaping RCTPromiseResolveBlock, - reject: @escaping RCTPromiseRejectBlock) { - resolve(view.idle()) - } - - @objc public static func transitionTo( - _ view: RNMBXViewport, - state: [String: Any], - transition: [String: Any], - resolve: @escaping RCTPromiseResolveBlock, - reject: @escaping RCTPromiseRejectBlock - ) { - view.transitionTo(state: state, transition: transition) { finished in - resolve(finished) - } - } -} diff --git a/ios/RNMBX/RNMBXViewportModule.h b/ios/RNMBX/RNMBXViewportModule.h index ae43fb2fcd..cd3be89135 100644 --- a/ios/RNMBX/RNMBXViewportModule.h +++ b/ios/RNMBX/RNMBXViewportModule.h @@ -2,18 +2,9 @@ #import #import "RNMBXViewResolver.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps_specs.h" -#else -#import -#endif -@interface RNMBXViewportModule : NSObject -#ifdef RCT_NEW_ARCH_ENABLED - -#else - -#endif +@interface RNMBXViewportModule : NSObject @end diff --git a/ios/RNMBX/RNMBXViewportModule.mm b/ios/RNMBX/RNMBXViewportModule.mm index 2e0b39b9d1..6dfb497d41 100644 --- a/ios/RNMBX/RNMBXViewportModule.mm +++ b/ios/RNMBX/RNMBXViewportModule.mm @@ -3,9 +3,7 @@ #import #import "RNMBXViewportModule.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "RNMBXViewportComponentView.h" -#endif // RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps-Swift.pre.h" @@ -13,9 +11,7 @@ @implementation RNMBXViewportModule RCT_EXPORT_MODULE(); -#ifdef RCT_NEW_ARCH_ENABLED @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; -#endif // RCT_NEW_ARCH_ENABLED @synthesize bridge = _bridge; - (dispatch_queue_t)methodQueue @@ -25,14 +21,11 @@ - (dispatch_queue_t)methodQueue return RCTGetUIManagerQueue(); } -// Thanks to this guard, we won't compile this code when we build for the old architecture. -#ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { return std::make_shared(params); } -#endif // RCT_NEW_ARCH_ENABLED - (void)withViewport:(nonnull NSNumber*)viewRef block:(void (^)(RNMBXViewport *))block reject:(RCTPromiseRejectBlock)reject methodName:(NSString *)methodName { diff --git a/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.mm b/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.mm index d8a96a4a1b..b103459c7d 100644 --- a/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.mm +++ b/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.mm @@ -7,27 +7,16 @@ #import "rnmapbox_maps-Swift.pre.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps_specs.h" -#else -#import -#endif -@interface RNMBXChangeLineOffsetsShapeAnimatorModule: NSObject -#ifdef RCT_NEW_ARCH_ENABLED - -#else - -#endif +@interface RNMBXChangeLineOffsetsShapeAnimatorModule: NSObject @end @implementation RNMBXChangeLineOffsetsShapeAnimatorModule RCT_EXPORT_MODULE(); -#ifdef RCT_NEW_ARCH_ENABLED @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; -#endif // RCT_NEW_ARCH_ENABLED @synthesize bridge = _bridge; - (dispatch_queue_t)methodQueue { @@ -52,13 +41,10 @@ - (dispatch_queue_t)methodQueue { [ChangeLineOffsetsShapeAnimator setEndOffsetWithTag:tag offset:offset durationMs:durationMs resolve:resolve reject:reject]; } -// Thanks to this guard, we won't compile this code when we build for the old architecture. -#ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { return std::make_shared(params); } -#endif // RCT_NEW_ARCH_ENABLED @end diff --git a/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.mm b/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.mm index 197a6cefa6..20f8f2eb8b 100644 --- a/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.mm +++ b/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.mm @@ -7,27 +7,16 @@ #import "rnmapbox_maps-Swift.pre.h" -#ifdef RCT_NEW_ARCH_ENABLED #import "rnmapbox_maps_specs.h" -#else -#import -#endif - -@interface RNMBXMovePointShapeAnimatorModule: NSObject -#ifdef RCT_NEW_ARCH_ENABLED - -#else - -#endif + +@interface RNMBXMovePointShapeAnimatorModule: NSObject @end @implementation RNMBXMovePointShapeAnimatorModule RCT_EXPORT_MODULE(); -#ifdef RCT_NEW_ARCH_ENABLED @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; -#endif // RCT_NEW_ARCH_ENABLED @synthesize bridge = _bridge; - (dispatch_queue_t)methodQueue { @@ -44,13 +33,10 @@ - (dispatch_queue_t)methodQueue { [MovePointShapeAnimator moveToTag:tag coordinate:coordinate durationMs:durationMs resolve:resolve reject:reject]; } -// Thanks to this guard, we won't compile this code when we build for the old architecture. -#ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { return std::make_shared(params); } -#endif // RCT_NEW_ARCH_ENABLED @end diff --git a/ios/RNMBX/Utils/RNMBXFollyConvert.h b/ios/RNMBX/Utils/RNMBXFollyConvert.h index 6a5d4c0381..913cc9bb5e 100644 --- a/ios/RNMBX/Utils/RNMBXFollyConvert.h +++ b/ios/RNMBX/Utils/RNMBXFollyConvert.h @@ -1,5 +1,3 @@ -#ifdef RCT_NEW_ARCH_ENABLED - #if __has_include() // static libs / header maps (no use_frameworks!) #import @@ -11,5 +9,3 @@ #else #error "FollyConvert.h not found. Ensure React-utils & RCT-Folly pods are installed." #endif - -#endif \ No newline at end of file diff --git a/ios/RNMBX/Utils/RNMBXViewResolver.h b/ios/RNMBX/Utils/RNMBXViewResolver.h index f080f7d439..634c48a5e2 100644 --- a/ios/RNMBX/Utils/RNMBXViewResolver.h +++ b/ios/RNMBX/Utils/RNMBXViewResolver.h @@ -1,7 +1,7 @@ // // RNMBXViewResolver.h // -// A utility class for resolving React Native views across both old and new architecture +// A utility class for resolving React Native views. // This eliminates code duplication found in multiple RNMBX modules. // @@ -14,9 +14,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol RNMBXViewResolverDelegate -#ifdef RCT_NEW_ARCH_ENABLED @property (nonatomic, weak, nullable) RCTViewRegistry *viewRegistry_DEPRECATED; -#endif @property (nonatomic, weak, nullable) RCTBridge *bridge; @end diff --git a/ios/RNMBX/Utils/RNMBXViewResolver.mm b/ios/RNMBX/Utils/RNMBXViewResolver.mm index de663a356e..d6afc16a7d 100644 --- a/ios/RNMBX/Utils/RNMBXViewResolver.mm +++ b/ios/RNMBX/Utils/RNMBXViewResolver.mm @@ -1,7 +1,7 @@ // // RNMBXViewResolver.mm // -// Implementation of cross-architecture view resolver utility +// Implementation of view resolver utility // #import "RNMBXViewResolver.h" @@ -36,7 +36,6 @@ + (void)withViewRef:(NSNumber *)viewRef return; } -#ifdef RCT_NEW_ARCH_ENABLED [delegate.viewRegistry_DEPRECATED addUIBlock:^(RCTViewRegistry *viewRegistry) { [self resolveViewWithPolling:viewRef delegate:delegate @@ -47,18 +46,6 @@ + (void)withViewRef:(NSNumber *)viewRef attemptCount:0 startTime:nil]; }]; -#else - [delegate.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary *viewRegistry) { - [self resolveViewWithPolling:viewRef - delegate:delegate - expectedClass:expectedClass - block:block - reject:reject - methodName:methodName - attemptCount:0 - startTime:nil]; - }]; -#endif } + (void)resolveViewWithPolling:(NSNumber *)viewRef @@ -121,7 +108,6 @@ + (void)resolveViewWithPolling:(NSNumber *)viewRef #pragma mark - Private Methods + (UIView *)resolveView:(NSNumber *)viewRef delegate:(id)delegate { -#ifdef RCT_NEW_ARCH_ENABLED if (delegate.viewRegistry_DEPRECATED) { UIView *componentView = [delegate.viewRegistry_DEPRECATED viewForReactTag:viewRef]; if (componentView) { @@ -135,11 +121,6 @@ + (UIView *)resolveView:(NSNumber *)viewRef delegate:(id #import -#import @interface MapView : UIView @end