From 1bc695b8a76b5b2248676f93f3b484bea65ac92a Mon Sep 17 00:00:00 2001 From: Andrew Gable Date: Mon, 6 May 2024 16:13:53 -0600 Subject: [PATCH] Try another patch (rename) --- patches/@rnmapbox+maps+10.1.20.patch | 140 ++------------------------- 1 file changed, 8 insertions(+), 132 deletions(-) diff --git a/patches/@rnmapbox+maps+10.1.20.patch b/patches/@rnmapbox+maps+10.1.20.patch index 4257e0417904..7f5150cab26e 100644 --- a/patches/@rnmapbox+maps+10.1.20.patch +++ b/patches/@rnmapbox+maps+10.1.20.patch @@ -121,135 +121,11 @@ index 6fa19e5..54d0ff9 100644 #import #import -diff --git a/node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.mm b/node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.mm -new file mode 100644 -index 0000000..d8a96a4 ---- /dev/null -+++ b/node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.mm -@@ -0,0 +1,64 @@ -+#import -+#import -+ -+#import -+#import -+#import -+ -+#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 -+@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 { -+ // It seems that due to how UIBlocks work with uiManager, we need to call the methods there -+ // for the blocks to be dispatched before the batch is completed -+ return RCTGetUIManagerQueue(); -+} -+ -+RCT_EXPORT_METHOD(create:(nonnull NSNumber*)tag lineString: (nonnull NSArray*)coordinates startOffset: (nonnull NSNumber*)startOffset endOffset: (nonnull NSNumber*)endOffset resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) { -+ resolve([[ChangeLineOffsetsShapeAnimator createWithTag:tag coordinates:coordinates startOffset:startOffset endOffset:endOffset] getTag]); -+} -+ -+RCT_EXPORT_METHOD(setLineString:(nonnull NSNumber*)tag coordinates: (nonnull NSArray*)coordinates startOffset: (nonnull NSNumber*)startOffset endOffset: (nonnull NSNumber*)endOffset resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) { -+ [ChangeLineOffsetsShapeAnimator setLineStringWithTag:tag coordinates:coordinates startOffset:startOffset endOffset:endOffset resolve:resolve reject:reject]; -+} -+ -+RCT_EXPORT_METHOD(setStartOffset:(nonnull NSNumber*)tag offset: (nonnull NSNumber*)offset durationMs: (nonnull NSNumber*)durationMs resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) { -+ [ChangeLineOffsetsShapeAnimator setStartOffsetWithTag:tag offset:offset durationMs:durationMs resolve:resolve reject:reject]; -+} -+ -+RCT_EXPORT_METHOD(setEndOffset:(nonnull NSNumber*)tag offset: (nonnull NSNumber*)offset durationMs: (nonnull NSNumber*)durationMs resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) { -+ [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/node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.mm b/node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.mm -new file mode 100644 -index 0000000..4f2f01a ---- /dev/null -+++ b/node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.mm -@@ -0,0 +1,56 @@ -+#import -+#import -+ -+#import -+#import -+#import -+ -+#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 -+@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 { -+ // It seems that due to how UIBlocks work with uiManager, we need to call the methods there -+ // for the blocks to be dispatched before the batch is completed -+ return RCTGetUIManagerQueue(); -+} -+ -+RCT_EXPORT_METHOD(create:(nonnull NSNumber*)tag startCoordinate: (nonnull NSArray*)startCoordinate resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) { -+ resolve([[MovePointShapeAnimator createWithTag:tag startCoordinate:startCoordinate] getTag]); -+} -+ -+RCT_EXPORT_METHOD(moveTo:(nonnull NSNumber*)tag coordinate: (nonnull NSArray*)coordinate durationMs: (nonnull NSNumber*)durationMs resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) { -+ [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/node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.m b/node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.mm +similarity index 100% +rename from node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.m +rename to node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.mm +diff --git a/node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.m b/node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.mm +similarity index 100% +rename from node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.m +rename to node_modules/@rnmapbox/maps/ios/RNMBX/ShapeAnimators/RNMBXMovePointShapeAnimatorModule.mm