From 391ff506ec32013c79f7942ae6870754f51fc7c4 Mon Sep 17 00:00:00 2001 From: Chayel J Heinsen Date: Wed, 24 Apr 2024 10:08:37 -0400 Subject: [PATCH] Deferred Deep Linking - Final pasteboard value support [sc-112616] (#12) --- android/src/main/java/com/rnmovableink/RNMovableInkModule.kt | 5 +++++ ios/RNMovableInk.m | 2 ++ ios/RNMovableInk.swift | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/android/src/main/java/com/rnmovableink/RNMovableInkModule.kt b/android/src/main/java/com/rnmovableink/RNMovableInkModule.kt index 64225aa..69679ed 100644 --- a/android/src/main/java/com/rnmovableink/RNMovableInkModule.kt +++ b/android/src/main/java/com/rnmovableink/RNMovableInkModule.kt @@ -92,6 +92,11 @@ class RNMovableInkModule(reactContext: ReactApplicationContext) : } } + @ReactMethod + func setValidPasteboardValues(values: ReadableArray) { + MIClient.validPasteboardValues(values.toArrayList()) + } + companion object { const val NAME = "RNMovableInk" } diff --git a/ios/RNMovableInk.m b/ios/RNMovableInk.m index 874cd04..0434302 100644 --- a/ios/RNMovableInk.m +++ b/ios/RNMovableInk.m @@ -22,6 +22,8 @@ @interface RCT_EXTERN_MODULE(RNMovableInk, NSObject) RCT_EXTERN_METHOD(showInAppMessage:(NSString *)link withCallback:(RCTResponseSenderBlock)callback) +RCT_EXTERN_METHOD(setValidPasteboardValues:(NSArray *)values) + + (BOOL)requiresMainQueueSetup { return TRUE; diff --git a/ios/RNMovableInk.swift b/ios/RNMovableInk.swift index cbb8526..82b5be0 100644 --- a/ios/RNMovableInk.swift +++ b/ios/RNMovableInk.swift @@ -109,4 +109,9 @@ public class RNMovableInk: NSObject { public func identifyUser() { MIClient.identifyUser() } + + @objc(setValidPasteboardValues:) + public func setValidPasteboardValues(values: [String]) { + MIClient.validPasteboardValues = values + } }