From 7c5dfd98dd3db25346296dc7a2992dbe4cef8979 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 18 Feb 2026 21:12:37 +0000 Subject: [PATCH 1/3] chore: update TextInput `onPaste` event to allow multiple files on iOS --- apple/MarkdownBackedTextInputDelegate.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apple/MarkdownBackedTextInputDelegate.mm b/apple/MarkdownBackedTextInputDelegate.mm index 87335ccb..9a11d63a 100644 --- a/apple/MarkdownBackedTextInputDelegate.mm +++ b/apple/MarkdownBackedTextInputDelegate.mm @@ -93,10 +93,10 @@ - (BOOL)textInputShouldSubmitOnReturn // This method is added as a patch in the New Expensify app. // See https://github.com/Expensify/App/blob/fd4b9adc22144cb99db1a5634f8828a13fa8c374/patches/react-native%2B0.77.1%2B011%2BAdd-onPaste-to-TextInput.patch#L239 -- (void)textInputDidPaste:(NSString *)type withData:(NSString *)data +- (void)textInputDidPaste:(NSArray *> *)items { - void (*func)(id, SEL, NSString*, NSString*) = (void (*)(id, SEL, NSString*, NSString*))objc_msgSend; - func(_originalTextInputDelegate, @selector(textInputDidPaste:withData:), type, data); + void (*func)(id, SEL, NSArray *> *) = (void (*)(id, SEL, NSArray *> *))objc_msgSend; + func(_originalTextInputDelegate, @selector(textInputDidPaste:), items); } @end From a64ff7f7222c287c0531af1027c3ae1e320547f1 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 19 Feb 2026 11:31:14 +0000 Subject: [PATCH 2/3] chore: update patch file url --- apple/MarkdownBackedTextInputDelegate.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/MarkdownBackedTextInputDelegate.mm b/apple/MarkdownBackedTextInputDelegate.mm index 9a11d63a..83c3a89a 100644 --- a/apple/MarkdownBackedTextInputDelegate.mm +++ b/apple/MarkdownBackedTextInputDelegate.mm @@ -92,7 +92,7 @@ - (BOOL)textInputShouldSubmitOnReturn } // This method is added as a patch in the New Expensify app. -// See https://github.com/Expensify/App/blob/fd4b9adc22144cb99db1a5634f8828a13fa8c374/patches/react-native%2B0.77.1%2B011%2BAdd-onPaste-to-TextInput.patch#L239 +// See https://github.com/Expensify/App/blob/9a0afa06d2c35d6ef1928d944cf7d28c17dd2bb4/patches/react-native/react-native%2B0.81.4%2B011%2BAdd-onPaste-to-TextInput.patch - (void)textInputDidPaste:(NSArray *> *)items { void (*func)(id, SEL, NSArray *> *) = (void (*)(id, SEL, NSArray *> *))objc_msgSend; From d3879e66b051b59bc50f4b6b46333d22c77b503e Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 19 Feb 2026 14:04:37 +0000 Subject: [PATCH 3/3] refactor: keep previous delegate method --- apple/MarkdownBackedTextInputDelegate.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apple/MarkdownBackedTextInputDelegate.mm b/apple/MarkdownBackedTextInputDelegate.mm index 83c3a89a..3a0b89e0 100644 --- a/apple/MarkdownBackedTextInputDelegate.mm +++ b/apple/MarkdownBackedTextInputDelegate.mm @@ -93,10 +93,16 @@ - (BOOL)textInputShouldSubmitOnReturn // This method is added as a patch in the New Expensify app. // See https://github.com/Expensify/App/blob/9a0afa06d2c35d6ef1928d944cf7d28c17dd2bb4/patches/react-native/react-native%2B0.81.4%2B011%2BAdd-onPaste-to-TextInput.patch +- (void)textInputDidPaste:(NSString *)type withData:(NSString *)data +{ + void (*func)(id, SEL, NSString*, NSString*) = (void (*)(id, SEL, NSString*, NSString*))objc_msgSend; + func(_originalTextInputDelegate, @selector(textInputDidPaste:withData:), type, data); +} + + - (void)textInputDidPaste:(NSArray *> *)items { void (*func)(id, SEL, NSArray *> *) = (void (*)(id, SEL, NSArray *> *))objc_msgSend; func(_originalTextInputDelegate, @selector(textInputDidPaste:), items); } - @end